Dataview TASKS query: only show non-blank tasks [solved]

I have a daily note template that already includes pre-made checkboxes for me to fill, example:

Personal

  • [ ]

Family

  • [ ]

I don’t always fill them all up.
I’ve now added a dataview query to gather uncompleted tasks from the previous day. Is it possible to only get tasks that have actual content? Example:

Personal

  • [ ] Take out the trash

Family

  • [ ]

In the above case, it should only pull task “Take out the trash” and not the empty Family one.

Thank you in advanced.

Could you show your query so far? It’s always easier to modify, instead of doing it all from scratch.

1 Like

Hey, thanks for the prompt reply.

TASK
FROM "November 24 2022"
WHERE !completed
GROUP BY header

the “November 23 2022” is created with templater for the previous daily note.

Hmm… How does your source file look like?

When I tried recreating that empty task, it disappeared with the current query. So do you have spaces or something similar on the end of that line, or not?

With a single space, to make it look like a task in the original note, the following query removed the task:

```dataview
TASK
FROM "November 24 2022"
WHERE !completed AND text != ""
GROUP BY header
```

For further information on what you can include in the where clause, see Metadata on Tasks and Lists - Dataview

1 Like

Wow, this worked!! Thank you so much!!

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