How can I sort tasks in a random order using Dataview?

I’ve figured out why some tasks that have been completed were showing up in the results, and this updated dataviewjs works if I delete the luxon.DateTime.now:

dv.taskList(dv.pages("#Tasks").file.tasks
.where(t => !t.completed) 
.sort(() => Math.random() - 0.5)
.limit(6));

However, I have not found a solution to stop the randomized list from refreshing when I leave the page.

1 Like