Dataview lookup of mentions of "today"

Things I have tried

I have a “dashboard” markdown file that I am using as the source for a canvas I am building. Each section of the canvas is loaded into it’s own card on the canvas, to represent different things (my agenda for the day, tasks, a weather widget, and so on).

What I’m trying to do

The one I’m stuck on is what I call “mentions of today”. What I’d like is a dataview script which will search my vault for any file that has a reference to today’s date (in YYYY-mm-DD format). I have this working in my current DailyNote setup using the following:

Table Created, Tags
from [[#this.file.name]]
where !contains(Tags,“MeetingNote”) and
!contains(Tags,“DailyNote”) and
!contains(file.name, this.file.name)

The problem with me moving to this dashboard/canvas setup is that I can no longer use “from [[#this.file.name]]”. I’m stumped as to how I might be able to do this and not have to change the script every day.

Any suggestions welcome.

the question is if the “reference to today” is just the string of the date or a link to the daily note. if it is a link then this code should work.

Table Created, Tags
from ""
where !contains(Tags,“MeetingNote”) and
!contains(Tags,“DailyNote”) and
!contains(file.name, this.file.name)
where contains(file.outlinks, link(string(date("today"))))

if it is just a plain string then it isn’t possible with DQL because DQL can’t search through plain text.

1 Like

BOOM. That’s the thing I was missing. I need to read up more on the various elements available in dataview. Thank you so much, @Dovos that’s exactly what I needed.

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