Aggregating personal details from meeting notes into Person pages

Problem:

When I meet with the same person multiple times, I feel bad when I don’t remember “the little things” about them. I want to have an easy way to extract personal details (e.g. college attended, favorite foods, kids’ names, partner name, etc…) from meeting notes into a Person page for individuals with whom I speak on a regular basis. This will also help me to thoughtful things for them over time that are personal to them.

Solution:

I include the snippet below in the Personal Notes section (header 2) of my Person template:

const personString = dv.current().file.name.split(" ").join("");

dv.list(dv.pages("").where(p => p[personString])[personString])

All of my Person notes in my People folder are titled with just the person’s name. So, the above snippet allows me to type the person’s name (caps sensitive) as inline metadata in any note, extract those details, and aggregate that text in the hub note for that Person. The line gets printed in the Person note as the actual text rather than just the link to the file.

E.g. if I write the below in any note, what will get printed in the Zack Ellis page will be “kids are Pinky and The Brain”

ZackEllis:: kids are Pinky and The Brain

The next thing I want to do is to figure out how to print both the file link and the plain text…e.g.

[[2022-11-23 Zack Ellis]]: kids are Pinky and The Brain

This is how Dataview works if I do something like:

list book
from ""
where book

to aggregate recommended books from different people:

5 Likes

This is cool. I do something similar but exactly the opposite way… that is, I keep ‘people notes’ and show meetings that they were in.

I played with the idea of pulling ‘people note’ facts into a ‘meeting note’. Some assumptions I made were:

  1. The ‘people note’ has the tag ‘#person
  2. The meeting lists who is attending using an outgoing link, e.g. …
# Attendees
- [[John Smith]]
- [[Jane Doe]]

Below is what I came up with…

DataView JS Code…

let facts = ["children", "hobbies"]
displayAttendeeFacts(facts)

function displayAttendeeFacts(facts) {
	let people = getLinkedPeople()   

	let tableColumns = ["person"].concat(facts)
	let tableDataFunction = (page) => {
		let personColumn = [dv.fileLink(page.file.name)]
		let factColumns = facts.map(fact => page[fact])
		return personColumn.concat(factColumns)
	}
	
	if (people.length > 0) {
		dv.table(tableColumns, people.map(tableDataFunction).sort(page => page.file))
	} else {
		dv.paragraph("No people.")
	}
}

function getLinkedPeople() { 
	// Get filenames from outgoing links
	let outlinks = dv.current().file.outlinks || []
	let attendees = outlinks.map((link) => link.path.match(/.*\/(.*)\.md/)[1])

	// Retrieve 'people notes' with the same names as outgoing links
	let linkedPeople = []; 
	if (attendees.length > 0) {
		linkedPeople = dv.pages('#person')
			.filter(page => {
				let fileName = page.file.name
				let isNotATemplate = !fileName.contains("Template")
				let isAnAttendee = attendees.includes(fileName)
				return isNotATemplate && isAnAttendee
			})
	}

	return linkedPeople 
}
2 Likes

Love it. Very clever!