DataviewJS - How to get taskList without any header

What I’m trying to do

Given this two test notes:

The following script:

const MyTasks = dv.pages("#sometag").file.tasks.where(t=>!t.completed);
dv.taskList(MyTasks);

Gives this output:

I would like to have as output ONLY the tasks, without the filenames or anything else.

Things I have tried

I tried to group by Tasks, but still it is not good, because it removed the note name but now it says “Tasks (2)”

const MyTasks = dv.pages("#sometag")
	.file.tasks.where(t=>!t.completed)
	.groupBy(p => p="Tasks");
dv.taskList(MyTasks);

This is the output:

image

Can you please help me? I just want the tasks, nothing else. And I cannot use dataview, I need to use dataviewjs; this script I posted is a simplification of something more complex.

Thanks!

Just do dv.taskList( MyTasks, false ) :slight_smile:

1 Like

Thank you @holroy , but this is the same as I got in if you check the screenshot of what I tried. I still get the header “Tasks (2)”. How do I get nothing, no headers at all?

Use it with your first query, not the grouped query.

1 Like

Brilliant! Thank you very much!
That solve my need! :+1:

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