Linking two templates (people with meeting notes)

What I’m trying to do

I am new to Obsidian and new to the world of codes and plugins, but LOVING it! Really trying to create my own Obsidian wonder-tool!

I am categorizing my notes, and amongst others I have created templates for ‘people’ and for ‘meetings’. One thing I am trying to create is an automatic link between my people-template and my meetings-template. So what I want is a link in my people template that shows a list of all the meetings he/she appeared in that updates by itself. Or at least the top 5.

Things I have tried

I have tried to write something myself, inspired on the dashboard code: $=dv.list(dv.pages('"Meeting notes"').sort(f=>f.file.mtime.ts,"desc").limit(5).file.link).
But with that link I ofc only get the last 5 updated meeting notes. But I want only the ones in which he or she appears. So inspired by Nicole vd Hoeven’s amazing ‘Obsidian task management with Dataviewjs, Templates, Daily Notes’ youtube video I tried adjusting the code to below, but then my template disappears and crashes:
$=dv.list(dv.pages('"Meeting notes"').sort(f=>f.file.mtime.ts,"desc").limit(5).file.link) .where(t => t.text.includes("{{title}}")))

Dataview

I have Dataview and all its general settings turned on.

So before ruining my vault, please enlighten me with your codes/best practices etc :).

I can’t help with DataView, but an embedded search for [[Person’s name]] file:(Meeting notes) should do it.

How do you link a person to a meeting in the meeting note?

@CawlinTeffid thanks for your reply, I have tried a bunch, but couldn’t figure it out completely as I wanted. Found the answer though using dataview, which I will upload here :slight_smile: Thanks!

Eventually I found the answer in the ‘Dataview plugin snippet showcase’ discussion: Dataview plugin snippet showcase

Credits to @IanMoone82 who posted the following code:

  • The only complication I encountered is when two pages that both include this list and both link to each other elsewhere in the text, they will both disappear from each other’s lists.
  • So of course you need one to link to the other to trigger the dataview, and I guess that if you do this, the links will be in your note regardless (just outside of your dataview list)
  • Just a heads up that this could lead to an ‘incomplete’ dataview list, or maybe I did something wrong.

p.s. I am new to the forum and these kind of communities, so please let me know in case I do not conform any (unwritten) rules.

Cheers!

You’re doing fine. :slightly_smiling_face: Just mark your last post as the solution (the checkbox button at the bottom of the post, possibly hidden behind 3 dots) if you feel that’s solved the problem.

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