Things I have tried
For a sample file like this
file.tags: ['a', 'b']
list file.tags from [[filename]]
Wanting something like this as output.
Instead, the query returns
Dataview: Query returned 0 results.
What I’m trying to do
I want to have both types of tags combined into a single variable when queried from another page (like Map of Content).
In the example, by default,
#c is the implicit field
file.tags, However I am trying to append
#b through frontmatter.
- Implicit field:
- I doubt if you can use a field name with
.; try rename it to
- Tags created in yaml frontmatter aren’t true tags.
- If you want to join the two (tags + pseudo-tags) you can join
file-tags. But to render the pseudo-tags with usual tags visual you need to write them as a string with # symbol:
file-tags: ["#a", "#b"]
- Now, you can try this:
LIST file.tags + ", " + file-tags
Thanks. That answers it.
I tried this with tables too. But, this doesn’t work.
TABLE file.tags + ", " + file-tags
For Tables you need to add parenthesis and a title for the column (e.g. tags):
TABLE (file.tags + ", " + file-tags) as tags
tags: [ a, b, ‘c’, ‘d’]
and with dataview
table file.tags from [[+]]
It seems to be working now.
You are right: if you use “tags” in yaml frontmatter they become ‘true’ tags (showing in tag panel)…
If you want to run a query inside the note to list all the used tags in these note, then you just need to write an inline query like this:
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.