Task Problem ;(

hi,
i have a problem.
how can i output checkboxes/task that are marked with a tag separately?

unfortunately, the following code lists all tasks for me :frowning:

dv.header(2, 'Rechnungen');  
dv.taskList(dv.pages('#tagXY').file.tasks  
.where(t =>   !t.completed));  

but i only want to list all checkboxes with #tagXY… somehow this does not work?

You’re asking for pages with that tag.

You want to ask for tasks with that tag:

dv.taskList(dv.pages().file.tasks  
.where(t => !t.completed && t.tags.includes('#tagXY')));
dv.header(2, 'Rechnungen');  
dv.taskList(dv.pages().file.tasks  
.where(t => !t.completed && t.tags.includes('#task')));

thank you for the answer.
with the following code nothing more is displayed to me ;(

unfortunately I have no idea with programming.

i have a page with a #task and a checklist directly below it, still it doesn’t work ?!?

I thought you wanted tasks with a tag, rather than pages with a tag?

Either way, I’m confused, but if you copy/paste this you will see it shows all tasks with #tagXY:

- [ ] This task will show up #tagXY
- [ ] This task won't show up, since it doesn't have the tag

```dataviewjs
dv.taskList(dv.pages().file.tasks
.where(t => !t.completed && t.tags.includes('#tagXY')));  
```
1 Like

thank you very much, now something has become clear to me.

I have made a mistake
#TAGXY
[ ] Check

That is nonsense

[ ] Check #TAGXY

is correct :slight_smile:

thank you :slight_smile:

1 Like

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