Trouble with multiple tags & data view

Things I have tried

What I’m trying to do

I seem to be unable to use multiple tags in front matter and have any results returned by the data view plugin.
I have tried:

tags: "tag1, tag2"
tags:
  - tag1
  - tag2
tags: [tag1, tag2]

Regardless of which tag syntax I use in my front matter, the presence of a second tag returns 0 results from a data view query.
I'd really love to understand what I'm doing wrong and fix it as my degree starts in 2 days time.

You want to use the contains() function. Something like the following should give you a start:

```dataview
TABLE
        tags
WHERE
        contains(file.tags, "tag1")
```

The above will return any pages that has a tag of tag1 in it.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.