Is it possible to use dataview to list tasks from notes with certain metadata properties? For example, I would like a list of tasks from notes where there is
status: InProgress
in the metadata
Things I have tried
I tried
task
where status = "InProgress"
but to my understanding, when getting a task list, the “where” query is to check for task completion.
I know I can do something similar to
task
where contains(tags, "#inprogress")
but this requires me to tag every task, which I don’t want to do.
I have looked on the forums and google as well as the dataview documentation, but haven’t found anything that would help me achieve what I want.
Yes this is what I want to do thank you! Is it only possible to accomplish this with tags? While I don’t mind doing it this way, I don’t usually use tags.
What do you mean by this? The where query can be uses against all metadata, and in a task context it starts out related to the task itself, but you can also query file metadata.
How did you declare the status? Was it in a frontmatter block? Was it in the body of the note?
For tasks, I’ve only seen it used in most examples for getting tasks that are completed or not (!competed vs completed) and used with file.day, but I’ll admit I’m not an advanced user of dataview. status was declared in the frontmatter block
for the example I gave above
task
where status = "InProgress"
if I change task to list, it works, but with task it says there are no results for the query
---
Zstatus: InComplete
status: InComplete
---
- [ ] my task
- [x] with status "x"
## Base query
```dataview
Task
Where file = this.file
```
## status
```dataview
Task
Where file = this.file
WHERE status = "InComplete"
```
## zstatus
```dataview
Task
Where file = this.file
WHERE zstatus = "InComplete"
```
## file.frontmatter.status
```dataview
Task
Where file = this.file
WHERE file.frontmatter.status = "InComplete"
```
## x status
```dataview
Task
Where file = this.file
WHERE status = "x"
```
This file in reading view displays as the following for me: