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
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?
AlanG
August 3, 2023, 1:50pm
2
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 ?!?
AlanG
August 3, 2023, 2:02pm
4
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
thank you
1 Like
system
Closed
August 10, 2023, 2:10pm
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.