Return/Echo `dataviewjs` result in a Templater script

Damn it, it works!! :smiley: - 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. :bowing_man:

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!