Expansion of Terms, Abbreviations, and Definitions

Yes, it would be possible! :smiley:

I would simplify the structure slightly, though, so I tested with the following BM file:

---
tags:
  - f78368
  - abbreviation
contexts:
- term: "[[Terminology/Business Manager]]"
  fileContexts:
  - "[[Projects/Some Project Or Other]]"
  - "[[Projects/Another Project]]"
  - "[[Another Context]]"
- term: "[[Terminology/Breakfast Monitor]]"
  fileContexts:
  - "[[Projects/Another Project]]"
- term: "[[Terminology/Bowel Movement]]"
  fileContexts:
  - "[[Health]]"
  - "[[Puerile Jokes]]"
---

```dataview
TABLE WITHOUT ID ctx.term, ctx.fileContexts
WHERE file = this.file
FLATTEN contexts as ctx
```

This would be easier to maintain, as it has shorter names and a slightly simpler syntax, but it is still very queryable(?). The query above lists the various terms, with the corresponding contexts.

In the other files, you could then use this query:

```dataview
TABLE ctx.term
FROM #abbreviation 
FLATTEN contexts as ctx
WHERE contains(ctx.fileContexts, this.file.link)
```

And it would list all the matching abbreviations with the file linking to the term. I’m not sure where you would pick the description from? Is that a property of the ctx.term file? If so, you could add it by simply doing something like ctx.term.summary or similar.

1 Like