Steps to reproduce
input the Dataview query in title. it shows nothing.
Expected result
I suppose it will show all simple list items in my vault.
Actual result
No results to show for task query.
Environment
- Operating system:
- Debug info:
input the Dataview query in title. it shows nothing.
I suppose it will show all simple list items in my vault.
No results to show for task query.
We do not accept issues for community plugins here.
Moved to help.
Please open an issue on the repository for the Dataview plugin.
TASK FROM “/” WHERE !task does not work too.
What do you expect out of that query?
It’s not really making any sense as you’re asking for TASKS
that is list item where the the task
is set to true
, and then you negate that by doing WHERE !task
aka asking the it to be a faulty value. That gives, and sound give nothing.
If you want non-task list items you should use LIST
(possibly with flatten and/or without id) with something similar in the where clause.
LIST is query to files in vault. Not solve the problem
This?
```dataview
LIST
file.lists
FROM ""
LIMIT 10
```
I actually query like this:
TASK From “/” WHERE !task AND coined= “reserved”
to extract list items with annotation [coined::reserved], I can not get it work.
What are you trying to accomplish with the following line?:
WHERE !task
That line removes all tasks found by FROM "/"
, resulting in an empty list.
As said before, you can’t do the TASKS
& WHERE !task
together, they counter each other. You need to use LIST
in combination with some other magic. Try out the following in a note of its own, and see if you get how to to do this:
- [ ] Oopsie, that was a task
- Not a task, nor reserved
- Another list item [coined:: reserved]
- Yet another (coined:: reserved) item
- [ ] A (reserved:: reserved) task
## All list items
```dataview
LIST WITHOUT ID item
FLATTEN file.lists as item
WHERE file.name = this.file.name
```
## Non-task and coined:: reserved
```dataview
LIST WITHOUT ID item.text
FLATTEN file.lists as item
WHERE file.name = this.file.name
WHERE !item.task AND item.coined = "reserved"
```
This outputs the following:
I’m ignoring the output of the first list, but as you can see, this lists out each of the list (and task) test in the first listing, and in the second it’s limiting based upon not being tasks, and having the reserved
text for the coined
field.
When you adapt to your setting, you would most likely want to replace the WHERE
line with something a little more limiting, like either a FROM
clause and/or another WHERE
clause. My WHERE
clause limits the query to that particular file.
It worked fine only remove WHERE file.name = this.file.name
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.