Damn it, it works!! - Sorry, @holroy , I think I totally didn’t misunderstood your previous reply, but I just tested the
dv.markdownTaskList()
function inside the Templater script, and it works beautifully!!
Thanks for your help.
For others facing the same problem/curious about the solution that works:
<%*
const dv = this.app.plugins.plugins["dataview"].api
tR += await dv.markdownTaskList(
dv.pages('"pages"').file.tasks.filter(task =>
!dv.func.contains(task.tags, "untask") &&
!dv.func.contains(task.tags, "scheduled") &&
!task.completed
)
.sort(() => 0.5 - Math.random()).slice(0,1) )
%>
This is the way!