Sorting Tasks in Dataviewjs

What I’m trying to do

I have a query that is pulling all open tasks broken down by the note they live in.
Note name 7/10/23 (2)
[ ] Task 1
[ ] Task 2
Note name 7/12/23 (1)
[ ] Task 3
But I’m trying to have the notes be sorted based off which note was update more recently.
Note name 7/12/23 (1)
[ ] Task 3
Note name 7/10/23 (2)
[ ] Task 1
[ ] Task 2

Things I have tried

I’m pretty new to Obsidian and Dataview and have zero coding experience. So I’ve pieced this together from what I’ve found. It pulls the tasks just fine but the sort isn’t happening.

```dataviewjs
dv.taskList(dv.pages().file.tasks
	.where(t => !t.completed)
	.sort(f => f.date, 'desc'))
Thanks!!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.