I have pages tagged with #person containing the person name (identical to the page name) and inline fields:
Name
Spouse:: [[spouse name]]
Parent:: [[parent name]] #person
There may be zero, one or several Spouse and Parent fields.
What I would like to do:
Create table with Name, Spouses, Parents, Children
for each person P
display P, Spouse outlink(s), Parent outlink(s)
for each inlink
if P is mentioned in inlink source page as “Parent:: [[P]]”
then display inlink as Children
I would appreciate your help, or any reference to a similar topic in this forum - which I could not find. Many thanks!
TABLE WITHOUT ID
file.link AS Name,
Spouse AS Spouses,
Parent AS Parents,
filter(file.inlinks, (i) => contains(i.Parent, file.link)) AS Children
FROM #person
I’m not versed in js side, but in dataviewjs I think you can’t follow the same logic used in filter for Children…
But if difficult, you can run a dql query inside dataviewjs. Explore dv.tryQuery().