Allow dynamic variables to be used inside advanced queries

I’ve tried to use dynamic variables inside advanced queries, and it doesn’t work, e.g.

#+BEGIN_QUERY
{:title "All todos with tag project"
   :query [:find (pull ?b [*])
   :where
   [?p :block/name <% current page %>]
   [?b :block/ref-pages ?p]]}
#+END_QUERY

This would greatly improve the usefulness of Advanced Queries.

Hi @Hulk, try this https://logseq.github.io/#/page/61c1f5aa-a5c0-482f-afef-f3b996d91dc0

1 Like