I have the following dataview query I’m using (a lot):
TABLE WITHOUT ID string(link(rows.file.link, rows.title)[0]) AS Note, list(rows.L.text) AS "Text"
FROM ""
FLATTEN file.lists AS L
WHERE
contains(L.tags, "#retro")
or
contains(L.tags, "#internal")
WHERE contains(file.folder, this.file.folder)
GROUP BY file.link
What I’m trying to do
My basic workflow is to have a folder stucture like this
Projects/CompanyName/ProjectName/00 - Sprint 1
In the sprint folder are folder like, 00 - Refinement, 01 - Planning, 02 - Story XXX, etc, etc. During my daily work I add tags like #retro or #internal to notes/blocks that will be relevant later. When it comes to the retro meeting I open a new note from Templater where the query is used.
I have a current running project, in the subfolder Sprint 1 until Sprint 7 works perfectly. I think the issue exists after I had to format my laptop and restore my vault from Git. It seems files in folders that are created after the format/restore of the vault are not being caught by the query. Newly created files in folders 1-7 do show up in the query.
Things I have tried
Tried to create a complete new vault, use the same query, doesn’t work. I obviously tried to restart the device, I checked permission settings for the folders and files with “icals” in terminal, example: icacls "01 - Company - ProjectName" /T > folder.txt
For me, the query works when first written, but if I move the file containing the query to a new folder, the query only runs if I navigate away from and then back to the file, forcing Dataview to refresh.
I doubt that’s your problem. Just adding some diagnostics to the thread in the hope someone else can offer a solution.
Tried two versions of the query. Both work when Dataview is nudged.
```dataview
TABLE WITHOUT ID
string(link(rows.file.link, rows.title)[0]) AS Note,
list(rows.L.text) AS "Text"
FROM ""
FLATTEN file.lists AS L
WHERE file.folder = this.file.folder
WHERE
contains(L.tags, "#retro")
or
contains(L.tags, "#internal")
GROUP BY file.link
```
- test #retro
- 222 #internal
```dataview
TABLE WITHOUT ID string(link(rows.file.link, rows.title)[0]) AS Note, list(rows.L.text) AS "Text"
FROM ""
FLATTEN file.lists AS L
WHERE
contains(L.tags, "#retro")
or
contains(L.tags, "#internal")
WHERE contains(file.folder, this.file.folder)
GROUP BY file.link
```
To nudge Dataview which is needed when the query hasn’t changed, but the data the query is depending upon has changed without Dataview noticing it we’ve got a few options: (This typical happens if you just edit the data without switching modes, which can cause a fail at updating the cache)
Close/re-open the note with the query
Add/remove something, like a space character, to the query causing it to be re-evaluated
Switch away from editing mode in the changed note with data. This one can be a little finicky
Cause a rebuild of the current view
The latter I’ve used to do with either a Templater and/or QuickAdd script, but I’ve recently supplied a command Dataview: Rebuild current view which you now can attach to a hotkey of your choice to do this whenever you want to nudge Dataview.