Dataview plugin snippet showcase

Part showcase, part question: I am trying to create something like the Tag pane core plugin but inline and filtered for creating a dynamic MOC index of tags meeting a regex criteria.

Here is a tag index dataview code that I found here (thanks @mnvwvnm !) that I sparsely modified to list in alphabetical order.

TABLE WITHOUT ID (tag + "(" + length(rows.file.link) + ")") 
AS Tags, join(rows.file.link, ", ") AS Files FROM "" 
WHERE file.tags 
FLATTEN file.tags AS tag 
GROUP BY tag 
SORT rows.tag ASC 

Q: How do I modify this to filter by the #tool tag and subtags? (Using WHERE contains(file.tag, “tool”) or similar doesn’t work because it also grabs all of the other tags referenced in that file.

3 Likes