I just tried changing the DQL to dataviewjs, but there seems to be something wrong with the incoming link [[WIP]] and [[Plan]]
table without id SelfLink as Link, ToDo, Scale, StartDate, DueDate
from [[WIP]] or [[Plan]] and "Work/Project" or "Personal Management/ToDoList"
flatten (DueDate - date(today)) as DueDate
where FinishTime = null
sort StartDate asc
Hi @traxxomniac, welcome to the Obsidian community!
Your FROM syntax seems fine. I tried a similar query in my vault and it was able to find the incoming links. I do notice, however, a difference in the query itself that might be causing your problem.
In your DQL, you have:
from [[WIP]] or [[Plan]] and "Work/Project" or "Personal Management/ToDoList"
…but in your DataviewJS you have:
dv.pages('[[WIP]] or [[Plan]] and "Personal Management/ToDoList" or "Work/Project"')
You have your ANDs and ORs in different positions. Because ANDs are usually executed before ORs, this means the two queries may pull very different result sets.
In your first set you have:
incoming link to [[WIP]] OR
incoming link to [[Plan]] AND in folder “Work/Project” OR
in folder “Personal Management/ToDoList”
In your second set you have:
incoming link to [[WIP]] OR
incoming link to [[Plan]] AND in folder “Personal Management/ToDoList” OR
in folder “Work/Project”
I recommend trying changing the DataviewJS statement to match the DQL, e.g.:
dv.pages('[[WIP]] or [[Plan]] and "Work/Project" or "Personal Management/ToDoList"')
In addition to what Craig says here, I would just like to mention that you can use ( ... ) to group the various conditions together, so I’m kind of imagining what you’re really looking for is something like:
( [[WIP]] or [[Plan]] ) and ( "Work/Project" or "Personal Management/ToDoList" )
Which would read (and translate) as:
Incoming links from either [[WIP]]or[[Plan]],
and
Folder equals to either “Work/Project” or “Personal Management/ToDoList”