First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.
What I’m trying to do
I am currently generating a TABLE of data for documents in my vault. It includes all of the data I wanted, and even displays a LINK as required. This LINK appears if the data contains the appropriate Tag or is a dash if not. Great!
However the moment I try to use the META function to grab information about the link stored in the Tag, the TABLE only shows those documents that have the Tag, not all of them with the dash for missing items.
This only occurs when I add the META function into the query.
Things I have tried
In the following examples:
file.link - obvious data
#documents AND #document-type/document-sub-type - stored in YAML tags
precis - text - stored in YAML
category - text - stored in YAML
Updated
- a document tag written as Updated:: [[Absolute Path To Document With Updates]]
- this DOES NOT appear in all Documents, only those with some kind of attached Update
This works - Displaying The Data As Required
TABLE WITHOUT ID
file.link AS "Document", precis AS "",
Updated AS "Update"
FROM #documents AND #document-type/document-sub-type
WHERE category = "background"
SORT sort-key ASC
As does this - Preliminary Test Of Link Function
TABLE WITHOUT ID
file.link AS "Document", precis AS "",
link(Updated) AS "Update"
FROM #documents AND #document-type/document-sub-type
WHERE category = "background"
SORT sort-key ASC
This does not work, displaying only the Documents with the Updated tag - Cutting Up The Link In Updated To Replace Display Text
TABLE WITHOUT ID
file.link AS "Document", precis AS "",
link(meta(Updated).path, "Update")
FROM #documents AND #document-type/document-sub-type
WHERE category = "background"
SORT sort-key ASC
I also tried the following with results the same as above - Checking If Updated Exists First
TABLE WITHOUT ID
file.link AS "Document", precis AS "",
choice(Updated = null, "NO", link(meta(Updated).path, "Update")) AS "Update"
FROM #documents AND #document-type/document-sub-type
WHERE category = "background"
SORT sort-key ASC
I have also replaced the choice line with choice(meta(Updated).path = null, "NO", link(meta(Updated).path, "Update")) AS "Update"
So I am at a point of confusion … until I attempt to use the META function in the DATAVIEW everything works as expected, all data is displayed with those updated documents displaying their link while others displaying the dash.
Is there some behaviour that I have not understood from the documentation?
Am I trying to use the META function incorrectly?
All help very much appreicated.