Use Dataview to show all meeting notes for today


I have a file that loads several things for me each day. I’d like to have a list of all pages from the tag #meeting_notes but only get those where the created date is the same as today.

I can’t seem to figure out how to get a where condition to work AND have it dynamically set.

For reference, I have my notes as follows:

Folder: ‘Meeting Notes/2022/12/2022-12-19 - My Special’

In addition, each note as the following tags:

- meeting_notes/2022/December
- 2022/12/20 
- Tuesday 

meeting_date: 2022/12/20

Things I have tried

$=dv.list(dv.pages('#meeting_notes').where(n => = '2022/12/20').sort(f=>f.file.mtime.ts,"desc")

$=dv.list(dv.pages('#meeting_notes').where(n => n.meeting_date = '2022/12/20').sort(f=>f.file.mtime.ts,"desc")

$=dv.list(dv.pages('#meeting_notes').where(this.file.cday = date(today);

@rwetzeler Although it doesn’t solve your specific question, I can’t help but to suggest that you check out a Meeting Note Templater script created by Zsolt Viczián. He explains it in this Youtube video:

Good luck!

You were very close.

Two things wrong:

  1. You can’t do this with an inline query, you need to use a full datablock:
dv.list(dv.pages('#meeting_notes').where(n => n.meeting_date === '2022/12/20').sort(f=>f.file.mtime.ts,"desc")
  1. You had n.meeting_date = '2022/12/20'

The single equals sign = is saying that you want to set all of your notes to have that value.

With three equals signs === you are saying “is equal to”, i.e. you are saying "find me all notes where the meeting date is equal to this date.

Thanks this is very helpful!

How would I get the dynamic date instead of hardcoded? I can’t seem to find a way to pass in today’s value instead of a hard coded value per example above.

For example:

dv.list(dv.pages('#meeting_notes').where(n => n.meeting_date === today("YYYY/MM/DD").sort(f=>f.file.mtime.ts,"desc")

moment is your friend. Learn it, love it, it’s great.

n.meeting_date === moment().format('YYYY/MM/DD')

1 Like

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