What I’m trying to do
Dataviewjs query tasks matching a particular tag and any nested/subtags—ideally whether or not it has any matching parent tags.
example: if the tag is WANTED,* tags such as
#other-tag/WANTED/subtag, would all be included in the results.
Things I have tried
- other forms such as icontains, tag.contains, etc. — errors
In context, from a dataviewjs query in my vault:
const tCount = dv.pages("") .file.tasks.filter(task => task.tags.contains("⛑️") && !task.completed) .length;
I know I have at least one task that matches: incomplete & tagged “#for//”, but tCount comes back as 0, so I can’t proceed any further. (In that particular case, I have a tasks plugin callout which is shown or not shown depending on the tCount being 0 or not.)
It doesn’t seem to follow a regular dv query, which does show the subtagged task.
```dataview task where !completed AND contains(tags, "⛑️")
- [ ] order medicine