Use Links as Inline Key Field in Dataview to query content from Daily Notes

Things I have tried

I have looked up the help files for Dataview and also the documentation. I do not know Javascript, so don’t know if dataviewjs can solve this. Would appreciate any help on this.

What I’m trying to do

I want to use links as Keys for Inline fields just like I can use tags as Keys for inline fields. The question I have is how do I use Links for the same. For Example…

I write most of my notes on the Daily Notes pages (DNPs). Here I may have a conversation with PersonA and another with PersonB and I capture the notes as below on Today’s DNP.
[[PersonA]] Spoke with Person A and we discussed blablabla…
[[PersonB]] Spoke with Person B and he said BLABLABLA
I would have other conversations with these persons on previous Daily notes pages (DNPs) as well

What I want to do is capture the conversations as below, as InLine Dataview fields in my DNPs…
[[PersonA]]:: Spoke with Person A and we discussed blablabla…
[[PersonB]]:: Spoke with Person B and he said BLABLABLA
and query all conversations I had with Person A across the different DNPs, as below

TABLE Person A
FROM "journals" and [[Person A]]

This creates a table that has all the DNPs that contain [[Person A]], but the content after that e.g the notes about the conversation I had, doesn’t show under ‘PersonA’ column

However, instead of links, if I use tags as in…
#PersonA:: Spoke with Person A and we discussed blablabla…
#PersonB:: Spoke with Person B and he said BLABLABLA
and query all conversations I had with Person A as below

TABLE PersonA
FROM #PersonA 

I get a proper table with the content

Any ideas, what I am missing or is there another way to do this with Links?

1 Like

I do someting like that in my daily notes. I write something like this …

Subject:: Spoke with [[Person A]] and we discussed blablabla…
Subject:: Spoke with [[Person B]] and he said BLABLABLA

On each persons page I have the following dataview query that comes from the person template.

table without id file.link, Subject from "daily"
where contains(Subject, "[[{{title}}]]")
sort file.link desc
limit 10

This shows the last 10 pages with a subject field on it that contains the name of the person. The value {{title}} in the where will be replaced with the persons name when I create a new note with the persons name.

This works very nice. The only thing is that all subjects on that page are included in the result while I only want to see the subjects that contain the specific persons name.

I still do not have a solution for that. I hope this helpes.

2 Likes

Thank you very much for your response… I realised that I can write the same Key Value Subject multiple times in the same file and both will be picked up…
Like you said, there is no way to separate PersonA from B, unless of course you rename the Keys and Subject-PersonA, Subject-PersonB etc…

BTW, I got a response on Discord, that allowing [[Links]] as Inline Keys is probably in the roadmap… please see this link → Discord

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.