Query tasks that have no links

Hey, everybody!

I have a list of projects inside the Projects block. In each project I have a TODO.

I also have a block with 5 days of the week (Monday through Friday). I schedule a TODO on a particular day by copying the link to the block from the project list.

I have a list of unallocated tasks in the projects (Unplanning tasks). I want this list to contain tasks that have no links (in the Current week block). When I reference a task, it should disappear from the unplanned list.

f065c06a2a41e9ae7d69585a64788eaa

I was able to make a query that shows all TODOs in Projects, but I don’t understand how I can filter out all TODOs with links. In developer mode, I can see that the block has no way of changing parameters when it starts being referenced elsewhere on the page.

Welcome.

  • Normally some more filters are needed, but could begin with an advanced query like this one:
    #+BEGIN_QUERY
    {
     :query [:find (pull ?b [*])
     :where
       [?b :block/marker]
       (not [?other :block/refs ?b])
     ]
    }
    #+END_QUERY
    
  • to produce this:

Thank you! Works good!