hasTag() with dynamic parameter

What I’m trying to do

base filter looks for files that have any tag that is contained in current file’s tags, (or in the current file’s aliases if you use Tag Notes)

Things I have tried

file.tags.containsAny(this.tags) or
file.tags.containsAny(this.aliases)
or simply contains()
also thought the list property might first have to be converted to string using .toString() or .join(“,”)
Can’t get it to work.

Hi.

The following works in my vault, matching tags stored in Properties:

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - file.tags.containsAny(this.tags)

```

Nothing returned at all for you?

Sorry, I just closed Obsidian and reopened it. It did some reindexing and now everything works fine. Thanks anyway for taking the time to answer me.

1 Like