I have a meeting template (block) where i can add the name of the person i have meeting with or the name of the project (always page).
I would like to have a query automatic to retrieve all the block with the tag follow up.
Hi.
I think the problem is that the parent-block has different reference pages not only #chiccoach but also #meeting. The TODO that are created inside a meeting block also they have #meeting reference, so when I query I get all the TODO.
I will try to find an example.
My question is if the parent block has two references #meeting and #chiccoach, the query will search the block with reference #meeting AND #chiccoach or #meeting OR #chiccoach?
In my graph the problem is that the query basically gives me all the TODO with follow up, not only the one with #chiccoach.
But if I try to do the same in a new graph seems working…so I am a little lost
Your query has 2 seperate conditions for returning blocks.
It returns either those blocks that reference follow up (?t1) AND whatever the parent block references (for example meeting OR chiccoach) (?thing).
OR
those blocks that reference follow up (t1) AND the alias of an (arbitrary) page (?a from not otherwise specified page ?person)
Maybe the problem is that you see blocks because of that second part?
Change [?b :block/refs ?t1] to [?b :block/path-refs ?t1].
And change [?b :block/refs ?a] to [?b :block/path-refs ?a]
:block/refs is what the block itself refers to. :block/path-refs includes references in it’s entire lineage (so parents, grandparents etc). It also includes the page the block is on, so keep that in mind.
Sometimes I have in my parent block 2 reference such as
[[meeting]] with [[John]]
With the automatic query that get the parent block refs I then collect all the block with meeting as reference or tags.
There is a way to consider only one reference?
Here is the query for parent block for markers TODO
I get all the TODO that has or MEETING or SIFERIAX, so basically all my TODO.
I would like to have only the one with SIFERIAX.
I tried to use (not (page-ref ?b "meeting")) in the query, but adding this I will not even get the TODO of SIFERIAX that I wrote down during a meeting.
I do not know how to solve.
The only way is to use only refs instead of path-refs, but in this way I lose all the nested TODO
e.g.
Hi @Siferiax happy new year!!!
I have a question: the query for the parent block is perfect and can find the TODO based on the referenced page on the parent block.
If I have two referenced pages can find all todo for each pages. I am wondering if we can modify the query to make sure that the results is:
TODO with both pages referenced
basically if two pages are referenced I get only the todo in commons for both.
Happy new year!
I honestly don’t know if that is even possible. (Here see I don’t know everything )
To explain the clause [?parent :block/refs ?t1] is two results. Two rows.
If ?parent has an id of 1 and meeting 2 and Peter 3. The result would be. [1 :block/refs 2] [1 :block/refs 3]
As in two results. So then we ask that ?b also (path) references the same things. But that’s true for either result we just had.
So we can get [1 :block/refs 2] has a relation with ?b. So that gives us a result. Regardless of what the status of id 3 is.
You can see this if you use :find t1
Example: