What I’m trying to do
Most of my notes have tags in the form “Tags:: [[Link1]] [[Link2]]”. For my MOCs, I want to query notes that have a specific tag. Example scenario of what I want to do:
// Note1
Tags:: [[Notes MOC]]
// Note2
Tags:: [[Notes MOC]] [[TEST]]
// Note3
Tags:: [[NOT Notes MOC]]
What I would now like to do in my MOC:
// Notes MOC
```dataview
LIST
FROM "Note1" OR "Note2" OR "Note3"
WHERE contains(Tags, [[Notes MOC]])
However, that will only display Note1. Using:
// Notes MOC
```dataview
LIST
FROM "Note1" OR "Note2" OR "Note3"
WHERE contains(Tags, "Notes MOC")
Will only display Note2.
The underlying issue seems to be that only having one link in the inline field is treated as string while having more will be treated as array?
I can obviously get it to work by treating the single-value (string) case explicitly:
// Notes MOC
```dataview
LIST
FROM "Note1" OR "Note2" OR "Note3"
WHERE contains(Tags, "[[Notes MOC]]") OR Tags = [[Notes MOC]]
But I don’t see this as something I should have to do in every single query in the future. I know that I will forget that way too easily.
Is there another / more obvious way to handle this better / automatically?