Query all tags present in notes under a root folder

I use Obsidian for meeting notes, and any other correspondence for my project (each of my projects have a dedicated folder with all relevant files existing in there). When taking notes, I flag things I need to remember that come up in conversation, for example if one of the meeting attendees has a great idea I will use the tag #idea and then write on the same line some details about the idea for later. Some of my tags are: #problem #idea #contact #resource … you get the idea.

I have a project dashboard note where I want to embed a list of all of these tags in a useful way. It would be great if I could see the note, then all tags in the note with context. Something like the table below I made manually. Is this possible? If not, can you suggest a change in workflow to make it possible? The point is to mark up my notes with important bits and find them later with context.

File Tags
Meeting note 01/01/2025 #idea this is a cool idea I heard in the call
#contact this is a contact recommendation to help do x,y,z
#deadline this is very important deadline
#problem this is a problem I need to remember
Meeting note 02/01/2025 #news some news I heard in the call
#quote an important quote from a stakeholder

In your meeting notes, if you type your tagged info in lists like this:

- #idea this is a cool idea I heard in the call
- #contact this is a contact recommendation to help do x,y,z

… then you could use the Dataview plugin to aggregate them.

Here’s Dataview code to get you started:

```dataview
TABLE rows.l.text AS "Tags"
FROM "meeting notes"
FLATTEN file.lists AS l
WHERE l.tags
GROUP BY file.name AS "File"
```

That code and the items from your example look like this:

1 Like

Not quite a table, but the same info could be presented as an embedded search:

~~~query
path:"example/folder/" (tag:contact OR tag:idea OR tag:problem OR tag:resource)
~~~

This is the solution, thank you so much. Can I ask, how can I filter this further to just include the files that link to the current doc?

how can I filter this further to just include the files that link to the current doc?

Change the “from” line to FROM [[]], like this:

```dataview
TABLE rows.l.text AS "Tags"
FROM [[]]
FLATTEN file.lists AS l
WHERE l.tags
GROUP BY file.name AS "File"
```
1 Like