Expansion of Terms, Abbreviations, and Definitions

Thanks again for your indispensable assistance. I think this is shaping up to be a “Share and showcase” post.

The frontmatter can be edited manually, but I found it easier to use Metadata Menu. By using the Metadata Menu fileClass function, I created a fileClass file_Abbreviation, which is linked to the tag abbreviation, or any note in the folder Abbreviations. The fileClass includes the following fields:

  • contexts (ObjectList)
  • term (File link) (child of contexts)
  • fileContexts (Multifile link) (child of contexts)

This means that all notes with that tag or in that folder can be given the fields semi-automatically, and the field entry is made easier.

An example for the abbreviation “BM2” frontmatter after editing:

---
tags:
  - abbreviation
contexts:
  - term: "[[Terminology/Breakfast Monitor]]"
    fileContexts:
      - "[[Organisations/International Union of Railways]]"
  - term: "[[Terminology/Bowel Movement]]"
    fileContexts:
      - "[[Projects/Podcasts/Coiled Spring/Podcast]]"
      - "[[Abbreviations/Puerile Jokes]]"
  - term: "[[Terminology/Business Manager]]"
    fileContexts:
      - "[[Projects/Another Project]]"
      - "[[Documentation Publishing Plan]]"
---

Then in the body of the abbreviation note I can put this:

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

Which displays the uses of the abbreviation in the various contexts:

Now in the document or other context requiring a list of abbreviations relevant in that context, we canb have this:

TABLE WITHOUT ID ctx.term as "Term", ctx.term.summary as "Summary", ctx.fileContexts as "Context(s)"
FROM #abbreviation
FLATTEN contexts AS ctx
WHERE contains(ctx.fileContexts, [[Podcast]])

(note that “[[Podcast]]” is not in quotes in the WHERE expression. That was the problem before.)

I could even skip the column showing contexts, because we know the abbreviation is relevant to the current context, and we may not care what other contexts it’s relevant in.

All working well now, thanks!

1 Like