What I’m trying to do
Creating a dataview table of all notes containing a dataview query and their folder name.
Things I have tried
Nothing, I have no idea how to do that.
Creating a dataview table of all notes containing a dataview query and their folder name.
Nothing, I have no idea how to do that.
If you have used key–value fields in your notes to tell Dataview that the notes contain queries, those fields could be queried, such as containsDVquery: Yes
.
---
containsDVquery: Yes
---
```dataview
TABLE
WHERE containsDVquery
LIMIT 50
```
If there are no key–value fields for Dataview to query against, you can use a core search query (and a hack to show the path) to find notes that contain Dataview’s opening syntax:
```query
path:/./ ```dataview
```
The same syntax can be used in the core Search
tool.
If you’ve not marked those notes somehow like @anon45210282 is talking about, there is no metadata indicating fully that there is a dataview query in a note.
There are metadata which indicates which files have code blocks, but sadly they’re not reporting what kind of a code block it is.
In other words you might scan the metadataCache for notes with code blocks, and then read the actual files to determine whether that code block is a dataview or dataviewjs query.
Those notes are not tagged or marked in any other way and are all over the place, hence the need. I already had:
content:("dataview")
but your 2nd solution is better since it includes the path.
Thank you!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.