I was making a qeury that only shows TODOs within pages that has a property stat:: #private
#+BEGIN_QUERY
{
:title [:h3 "private TODOs" ]
:query [:find (pull ?b [*])
:where
[?b :block/page ?p]
(property ?b :stat "private")
[?b :block/marker "TODO"]
]
}
#+END_QUERY
But it returns nothing. Where did I go wrong?
This is my sample page
But your line:
(property ?b :stat "private")
- uses
property
instead of page-property
- uses
?b
instead of ?p
Try this line instead:
(page-property ?p :stat "private")
1 Like
Sorry for the late reply. So this is the modified query according to your suggestion -
(edit for direct reply)
#+BEGIN_QUERY
{
:title [:h3 "private TODOs" ]
:query [
:find (pull ?b [*])
:where
[?b :block/page ?p]
(page-property ?p :stat "private")
[?b :block/marker "TODO"]
]
}
#+END_QUERY
However it does not seem to grab the TODO block under the page. I’m sure there’re some of them. I’ve again added the page referenced as following. Are there any instructions I didnt follow?