Deactivate or freeze dataview/tasks in old daily notes?

What I’m trying to do

I’ve got a lot of daily notes, all with embedded queries that pull up tasks for different time periods using various filters (priority/waiting etc). It occurs to me that every time I update a task, obsidian has to go back and update all those old daily notes. Is there a way to “freeze” a note after it is a day old? So that it is a record of what was done on that date and not being updated forever?

You’re touching in on two different issue here, and I’m not clear which one you are referring to.

Using dynamic queries

If you in your daily notes use a query like:

```dataview
LIST WHERE file.mday = date(today)
```

This would broadly speaking be listing all files modified today. However, if you pull up a daily note from last year with the same query, it’ll still list the same files since date(today) will always be “today”.

To count this issue, it’s common to rather use Templater (or the core Template ) plugin to have the query use a fixed date, like in:

```dataview
LIST WHERE file.mday  = date("2024-04-17")
```

When you open a note with this query in it, it’ll always to refer to that fixed date.

Triggering old queries

The other variant which could be considered based on your request would be what happens when you’ve got many, many files with queries, will these be updated if you change something in the vault?

The answer to that is that Obsidian (and Dataview) will not go back and update queries in old notes. Only when you actually open one of the older notes, will the queries within that particular note be executed again and show the “current” results of that query. A close file/note will not have its query executed before being opened.

1 Like

What you said about Triggering old queries is what I was trying to ask about. I didn’t realize that unopened notes don’t get updated, even though the links in them do (if you change a linked note title for example). Thanks

1 Like