Can file and tag names used in Dataview queries be auto updated?

I have searched for hours and cannot find anything close to addressing what I am looking for. I must be using the wrong terminology. Please help.

I use a lot of Dataview Queries to create lists of content by various categories using file names and tags. I have a lot of instances of this.

When I change a tag name or file name though, the file and tag names in the Dataview queries do not update. Then I have to hunt down every instance of the tag or file name used across my ever-growing number of Dataview queries and replace the old names with the new names one at a time.

Is there a way to get the file and tag names in my Dataview queries to auto-update when I change them?

Can you specify a little more? What’s your query?

Here is a type of query I use to capture quotes associated with principles of managing:

table file.size
from #Quote and #RM/1stPrinc/Manifest_Principles  

Now occasionally I fine tune the names of the principles. So I go to the tag list, and I think, using Tag Wrangler, I might change #RM/1stPrinc/Manifest_Principles to #RM/1stPrinc/Cohere_Circumstances. The tag name updates throughout all of Obdisan, but not within the Dataview queries.


Not only inside the dataview queries: all content inside code blocks doesn’t update, because they’re not metadata. Links, tags, etc, inside code blocks don’t update. It’s understandable, because if, for example, a tag inside the code count as a “real” tag, then all dataview code blocks would add unwanted metadata for the page where they are placed.

I never tested the plugin Tag Wrangler… I don’t know how it works. But a generic solution (not so nice) could be an intentional field to work as a filter in the note where you place your query. Something like:

filter:: #mytag/subtag

TABLE file.size
FROM #Quote
WHERE contains(file.etags, this.filter)

Once you update the tag name, I guess the value in filter will update too and the query will point to new tag value…


Cool! Just knowing " all content inside code blocks doesn’t update, because they’re not metadata" tells me what is possible and what is not! And the reason you give makes so much sense. Thank you so much.

The best alternative, or maybe even the best solution, is a Global Total-Vault Search and Replace function – one that a lot of people are looking for: Global (Mass / Vault-wise) search & replace

If/when we get this functionality in Obsidian, I hope it includes a preview of each match so I can see each one before I commit to replacing it.

@mnvwvnm Thanks so much for enlightening me!

1 Like

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