I would like to use dataview to build a table (not a dataview TASK view) that includes a column with the note (the first column, obviously) and a column with the text of the first uncomplete task that appears on that page.
Many thanks for this! And apologies for not including a query attempt. Will do that next time.
So, I’ve played with what you’ve suggested (while also trying to introduce some changes), but it seems I’m still a bit confused. Here’s what I currently have:
TABLE Without ID
rows.myTasks.text AS Task,
file.link AS Page,
FLATTEN file.tasks AS myTasks
GROUP BY file.link
The problem I’m running into now is that the file.link and the Project (a piece of metadata in each note) are not showing up. I suspect has something to do with the GROUP BY line, but I’m not entirely sure…
That is the problem of just give you a solution without context and previous attempts.
In the case you’ve no idea of the consequences of the command “GROUP BY” in the query.
The code has a order of commands, and some commands have consequences in the data structure on the background. The final reflection of that process is in the initial lines (the lines that define the columns, the last thing to consider in a table query).
The command GROUP BY something produces two things: the key (the something) and rows (the other things that now are nested in each group). That’s why we add the prefix rows. in rows.myTasks.text. I.e., generically, after the group command you need to add the prefix rows. to target the previous fields.
So, if you try rows.file.link and rows.Project maybe you achieve the wanted solution. (but because you group by file.link, you don’t need to add the prefix… you can use key AS Page)
But we are discussing a type of commands that require some previous learning in the way the metadata is structured in the raw and what happens after commands as GROUP BY and FLATTEN.
Extra: to see the structure of the metadata in specific file use this inline js query (activate js queries in settings > dataview) in that file: