DataviewJS and checklist: avoid cancelled tasks

Hello, I’m using this DataviewJS query:

dv.taskList(dv.pages('"Daily Notes"').file.tasks 
  .where(t => !t.completed)
)

And I want to avoid cancelled task listed on query

Do you know how to avoid listing cancelled task on DataviewJS? Thanks in advance.

Basic checkbox status are:

  • [ ] task
  • [x] task 2

Your custom status render is provided by your theme (Minimal, I guess), not a default thing.

You need to explore the implicit tasks metadata.

Run this inline query in a specific file to check all metadata related with that file:

`$=dv.span(dv.current())`

You’ll see the field status inside the file.tasks level as a specific metadata to store the symbol inside the “[ ]”.

At the end, maybe this works:

dv.taskList(dv.pages('"Daily Notes"').file.tasks 
  .where(t => !t.completed && t.status != "-")
)
2 Likes

Works like a charm! Thank you.

PS: Yes, I’m using Minimal theme.

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