I didn’t mean one unified query for both, but that I have two queries, one under the other. The first shows a list of tasks, the second a list of notes (some of them including those tasks). Both filtering them according to a) if they aren’t marked completed/done, and b) if they include a parameter (or not).
Here’s an example of such a section:
TASK FROM #tasks AND #people/mary WHERE !completed SORT Due
LIST FROM #people/mary WHERE !completed AND (!due = "" OR !priority = "") SORT Due
All task-related notes have "Completed: ", as well as other parameters like “Tags:”, “Status:”, “Due:”, etc., in the YAML front matter. However, I’m also using inline meta for each respective task. So, I can query a bundle of notes to get lists that either don’t have “Completed: Yes” in the YAML front matter, or contain tasks that aren’t marked completed. Here’s an example for notes with “Priority: High” in the front matter OR containing tasks marked with “[[Priority: High]]” inline:
LIST WHERE (!completed OR (Completed="No") OR (Completed="") AND !(Completed="Yes")) AND (Priority = "High") OR (Priority = "high") OR (Priority = "hi") OR (Priority = "3")
Although I don’t see an error in my syntax, it borks. Here’s an example of the front matter setup in a note:
--- Tags: [ people/mary ] Type: Status: Time: Due: Priority: Completed: Notes: ---
The way I’m understanding how dataview works, the above should show up with the query below, but it doesn’t:
List FROM #people/mary WHERE (!completed OR (Completed="No") OR (Completed="") AND !(Completed="Yes")) AND (priority="" OR Priority="" OR due="" OR Due="") SORT Due
Although the particular note doesn’t contain any tasks (so that maybe some inline meta was the source of the problem), and all values apart from the person’s tag are blank, it doesn’t show up with the List query above. The query itself is supposed to show all notes OR notes containing incomplete tasks with no priority or due date set.
As you might have noticed, some rules repeat, since I’ve realized YAML is case-sensitive - at least in Obsidian. I want my “rules” to work both if I set a date as “due” and “Due” in a note’s YAML.
It’s been hours I’m fumbling with this and I’m pretty sure it’s the stupidest mistake possible, but for the life of me I can’t pinpoint the problem.