Not sure if this is going to work but maybe you could try this :
```dataview
TASK
WHERE projekt AND !completed
GROUP BY projekt AS "Projekt"
```
The WHERE projekt part should return all the tasks tied to a projekt key (regardless of the name of the project)
I don’t know how you added metadata to your tasks so I can’t say how it’s going to work in your vault…
I used inline fields to quickly test the query above which gave me this result :
The first part was working ok but i wanted to do more with this.
Each page in my vault has YAML metadata with “projekt” with one more projects the note is refering to.
I wanted to do a querry in dataviewjs that will to 2 things:
check to list of acitive projects:
dv.list(
dv.pages('"Projekty"') // folder with all project Moc
.where(p=>p.projekt)
.where(p=>p.status !="koniec") // Project ended status
.where(p=>p.fileClass != "Mysl") // this class is for random notes
.projekt)
then do the querry:
task
where contains(projekt, "projects from the list in 1)") and !completed
group by projekt
(From my tests, .where() needed to be applied on dv.pages("").file.tasks… The query didn’t return anything the other way around dv.pages("").where().file.tasks)
I couldn’t test this with status and fileClass but it seemed to work from my side of the screen
this will find tasks from pages in “Projekty” from active Projects
the goal was to take the list of active procjet form the folder
dv.list(
dv.pages('"Projekty"') // folder with all project Moc
.where(p=>p.projekt)
.where(p=>p.status !="koniec") // Project ended status
.where(p=>p.fileClass != "Mysl") // this class is for random notes
.projekt)
and search all pages in vault for notes with project from the list. Then gather all not done tasks from notes that meet the criteria above, and goup them by Project names (from the list)