Bases: Querying files with a tag as exactly as it is

What I’m trying to do

Hello! I am trying to make a .base file which queries files only with a singular clippings tag underneath them. However, it somehow never works and I don’t know why.

Things I have tried

That’s all I’ve tried.

Can you share more information?

What information do you need?

the property I’m trying to filter is file.tags == clippings but it’s just not working. I’m trying to get everything that just has that specific tag but nothing is appearing on my end.

file.hasTag("clippings") && file.tags.length == 1
1 Like

Hi! Thanks for replying. This unfortunately does not solve my issue as I only need files which only have the tag clippings. Unfortunately, this solution queries every file that has that tag along with other tags, e.g. clippings, meeting-notes get included when I don’t need that.

It’s meant to do what you’re asking. Can you show the base you used with that filter and an example of a note it returned that had more than one tag?

1 Like

can you check the length of the tags list? you’re looking for just 1 item, right?

Sorry, I messed up the syntax on my end. The filter you suggested worked exactly the way I wanted to.

I’m so sorry for the confusion, and thank you for the help.

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