```dataview
TABLE WITHOUT ID
film as Film, year AS Year, locations as Location
FROM #peninsulafilms
WHERE contains(locations, "Granada")
FLATTEN locations
SORT year DESC, title ASC
```
Table 2
```dataview
TABLE WITHOUT ID
film as Film, year AS Year, locations as Location
FROM #peninsulafilms
WHERE contains(locations, "Granada")
SORT year DESC, title ASC
```
```dataview
TABLE WITHOUT ID film as Film, year AS Year, "[[Granada]]" as Location
FROM #peninsulafilms
WHERE contains(locations, "Granada")
SORT year DESC, title ASC
For links you don’t need to use the syntax for strings (the quotation marks) in the commands. Instead of WHERE contains(locations, "Granada") use WHERE contains(locations, [[Granada]])
To a rigorous query, instead of the “construction” of the column results ([[Granada]] as Location) you need to apply the filter function:
TABLE WITHOUT ID
film as Film, year AS Year,
filter(locations, (l) => l = [[Granada]]) as Location
FROM #peninsulafilms
WHERE contains(locations, [[Granada]])
SORT year DESC, title ASC
They all “seem” to work… as “free” tags, not as an inline field with multiple tags.
to check the differences (in fact, to check all metadata in your file) use this inline js query:
`$=dv.span(dv.current())`
tags in inline fields work too as generic tags in your file (as the tags you place anywhere in your content), i.e., they are implicit metadata at page level. As page level data (file.tags) they are by default a list/array. In this way, you can place your tags inside an inline field or outside… for implicit fields is the same (because you target file.tags, not tags)
If you use tags::, in the $=dv.span(dv.current()) results you’ll see at file level the field tags (file.tags) a list of tags. But you’ll also see a custom field called tags (but to avoid any confusion you can change it to tata) with your tags, not AS A LIST, but as a simple string with three tags inside. To the inline field tags(or tata) you have a string with tags inside. If you want that tags inside as a list you need to use the format
tata:: "#books", "#films", "#addresses"
But for “real” tags you don’t need an inline field… Outside the yaml frontmatter, just place your tags where you want. For example:
Thank you very much for the detailed reply. I learn a little more each day and find myself going back over notes and queries to refine them.
The jigsaw of my brain still doesn’t intuit when to use square brackets, commas, quotation marks, parentheses, etc.
And although I read the docs, I still fumble over arrays, strings, fields, values, and so on. I look at abstract examples and fail to apply them to the particularities of my data.
I enjoy the challenge, despite the frustration of being so slow.
Think a lot of people would be lost when dealing with Dataview without the help you give.