Hello,
maybe i can use this thread to ask my specific question with a similar topic.
Somewhere in my logseq i write blocks like this. It could be in journal pages or on pages, this shoudn’t matter for the query.
# [[topic1]]
- TODO make this
- TODO make that
- DOING dont forget this and that
# [[otherthings2]]
- TODO make this
- TODO make that
- DOING dont forget this and that
Now i would like to query any TODOs and DOINGs that are parent of a block with pagelink “topic1”.
#+BEGIN_QUERY
{:title [:h3 "ToDos of topic1"]
:query [
:find (pull ?b [*])
:where
[?p :block/name "topic1"]
[?b :block/refs ?p]
(task ?b #{"TODO DOING"})
]
}
#+END_QUERY
The above query finds nothing.
If i remove [?b :block/refs ?p]
it finds everything with TODO even [[otherthings2]]
, even though I specified [?p :block/name "topic1"]
.
So what is wrong?
Thank!