Dataview Missing Tags & Frontmatter

What I’m trying to do

I want to write a dataview query, that returns all notes that have a tag assigned in the note frontmatter. For example, I want to use frontmatter to tag notes as “projects”, and then use dataview to return a list of all such notes

My issue is that currently, I can only get dataview to return inline tags, but can’t get it to return anything based on frontmatter.

Things I have tried

Below is an image of what I’m seeing. At first I wrote a query looking for “#test” or “#projectt”, but when neither of these returned results, I pointed the query at a folder instead. Looking at the file details, dataview doesn’t seem to be recognizing either the inline tag or the frontmatter tag? Any idea what the fix may be?

Below is an example of a query that IS working, but I’m very lost as to why this one works but the above doesn’t

Most likely your frontmatter is invalid for some reason. Try going to reading view in that emergency prep file, and see if it doesn’t say “invalid yaml”.

Another error could be to have white space in front of the first triple-dash…

1 Like

Ah I made the worst mistake of all - I forgot to try restarting the app :sweat_smile:

All’s working now, appreciate the extra eyes!