Using a Dataview table to lookup and match properties in a note linked within properties?

What I’m trying to do

I have three note templates which there are many instances of [[Galaxy]], [[Planet]] and [[Organism]].

Each [[Organism]] has a property field defining which [[Planet]] it is attached to.
Each [[Planet]] has a property field defining which [[Galaxy]] it is attached to.

I would like to create a table on my [[Galaxy]] note listing all the organisms across the galaxy, but I can’t think how to do this without also defining which galaxy the organism is a member of?

I would like to be able to look at the Planet property on an Organism and check if that Planets Galaxy property field is a member of the Galaxy doing the lookup.

What I think a solution would look like?

On the [[Galaxy]] note.

TABLE WITHOUT ID
List_Organism as Organism
FROM #Organism
WHERE Property.Planets Parent.Galaxy == this.Galaxy
sort date DESC

Given Planet and Galaxy text properties (not list properties) that contain one link to the respective note, like:

---
Planet: "[[planet 1]]"
---

… this query in the galaxy note will list organisms in the galaxy:

```dataview
LIST
WHERE Planet.Galaxy = this.file.link
```

You wrote plural “Planets” and singular “Galaxy”, so I might have the wrong assumptions. If you can’t get it working, then what are your actual formats?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.