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

2 Likes

The URL no longer resolves. Would you be able to share a different link to the resource you are referring to? Much appreciated.