I have a Project template that looks like this:
status::
tags::
progress::
timeframe::
links::
deadline::
area::
client::
people-involved::
archived:: false
type:: Project
The people-involved
property would contain a list of people like this:
people-involved:: [[Person A]], [[Person B]], [[Person C]]
These people use a Person template that looks like this:
tags::
links::
last_interaction::
position::
email::
phone::
phone_2::
LinkedIn::
Twitter::
website::
cover::
company::
worked_with_at::
reference::
archived:: false
type:: Person
In the above, Persons A, B, and C will have a Linked Reference to whatever we name the project page.
Is there a way to use an advanced query and say:
Get the values stored in people-involved
on the current page and display those pages.
OR
Show every type:: Person
that has a linked reference to the current page.
1 Like
I don’t understand the exact question:
- Querying references in a property is generally done like this:
[?b :block/properties ?props]
[(get ?props :people-involved) ?names]
[(contains? ?names ?name)]
[?p :block/original-name ?name]
- This acquires the pages
?p
which are values of property people-involved::
- Likewise, pages
?p
of persons that reference ?current
page are generally acquired like this:[?p :block/properties ?props]
[(get ?props :type) ?type]
[(= ?type "Person")]
[?b :block/page ?p]
[?b :block/refs ?current]
- But what do you mean by “display those pages”?
- list their names
- They are already listed in the specific property.
- And hovering on each name pops-up the respective page.
- embed them
- Maybe you want a macro that turns the names into embeddings?
- other
I’m trying to make a generic query I can add to my template so whenever someone is added to people-involved
, they’re added to a table.
Here’s an idea of how I’d want it to look:
Thank you!
I’m curious what advantage using [[Person A]] #joined [[Some Project]]
over properties would be when using a query.