Sorry but I am not knowledgeable on js, but have searched forums and websites for advice, but I am unable to find a solution myself. I’ve tried modifying the query (below), but I really have no idea what I’m doing.
What I’m trying to do
I am trying to simply list all notes in my vault that contain uncompleted tasks. I have already got the js code for a list of uncompleted tasks, which works great, as follows:
dv.taskList(dv.pages().file.where(f => f.name != "my excluded files...").tasks
.where(t => !t.completed))
But I want to get a (clickable) list of just the file names, not the individual tasks. Ideally I would really like it to say how many uncompleted tasks there are for each file.
For test purposes, you can start with something like this:
TABLE filter(rows.T, (t) => !t.completed).text AS "Uncompleted tasks", length(filter(rows.T, (t) => !t.completed)) + " / " + length(rows.T) AS "Uncompleted / Total"
FLATTEN file.tasks AS T
GROUP BY file.link
SORT rows.file.name ASC