How to query files linked in an metadata list and get their metadata

Describing my files

I’ve got a bunch of files that have the same structure:

---
Meaning: "meaning of this file's word"
Synonyms:
  - "[[Synonym1]]"
  - "[[Synonym2]]"
  - "[[Synonym3]]"
---

Each “[[Synonym]]” is pointing to another word which has the same structure.

What I’m trying to do

All of those are connected into the graph but I’d like to have access to some metadata right from within the current word’s file : I would like to get a dataview table in which each line is one of the synonyms of the current word (.md note) and through which I could query their Meaning (or any of their metadata for that matter), which would look like:

|  Synonym     |  Meaning               |
|--------------|------------------------|
| [[Synonym1]] |  Meaning1              |
| [[Synonym2]] |  Meaning2              |
| [[Synonym3]] |  Meaning3              |

Things I have tried

I tried to flatten the table but the other metadata I get are only those from the current word:

table without id
Synonyms,
Meaning
where file.name = this.file.name
flatten Synonyms

→ What I get is a table with 1 line = 1 synonym but the Meaning column contains the Meaning of this.file.name

|  Synonym     |  Meaning                     |
|--------------|------------------------------|
| [[Synonym1]] |  Meaning of this file's word |
| [[Synonym2]] |  Meaning of this file's word |
| [[Synonym3]] |  Meaning of this file's word |

Try this variant, and see if that is closer to what you want:

```dataview 
table without id
  Synonym,
  Synonym.Meaning as Meaning
where file = this.file
flatten Synonyms as Synonym
```

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