Dataview Query using yaml note properties

What I’m trying to do

Hi - trying to include a Dataview query in a note template, that pulls a list of blocks (bulleted items) from all the notes in my Daily Notes folder that contain a certain tag.

I would like the tag to be present in the note’s yaml properties, so that when I create a note from the template, I can just change the property to the tag I want rather than having to update the dataview itself.

Things I have tried

Currently have the tag in the yaml as a project property.

project: ProjectTag

Below dataview gives an error “PARSING FAILED” on this.project

TABLE msg AS "Title", sender as "From", note as "Note"
FROM ("Daily" AND this.project )
SORT file.ctime DESC

I would like to use it in the “FROM” block as my guess is that would be more efficient than doing FROM all Daily Notes and the tag in the WHERE clause, but I can’t get it to work in the WHERE clause either.

The following hardcoded works:

TABLE msg AS "Title", sender as "From", note as "Note"
FROM ("Daily" AND #ProjectTag)
WHERE this.project
SORT file.ctime DESC

Appreciate your help!

You might need to transform this into a DataViewJS query, but I’m not sure exactly how to do that.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.