Skip to content

List files a contact page is linked to as a contact log for this person

Contributed by mnvwvnm via Discord

List contacts with a person

Basic

Use on a contact page

If you want to use this snippet on the contact page of the person directly, you can replace FROM [[person]] with FROM [](#). See AB1908 as an example. If you want to look at all files, everywhere, skip the additional "AND something" in FROM.

TABLE WITHOUT ID 
file.link AS "Contact note", 
day AS "Contact date"
FROM [AB1908](../10 Example Data/people/AB1908.md) AND "10 Example Data/dailys"

Variants

Show days since last contact

TABLE WITHOUT ID
file.link AS "Contact notes",
file.day + ": **" + T + " days**" AS "Last contacts" 
FROM [AB1908](../10 Example Data/people/AB1908.md) 
FLATTEN (date(today) - file.day).days AS T 
SORT file.day desc

Only show the most recent contact

TABLE WITHOUT ID
file.link AS "Contact note",
file.day + ": **" + T + " days**" AS "Last contact" 
FROM [AB1908](../10 Example Data/people/AB1908.md) 
FLATTEN (date(today) - file.day).days AS T 
SORT file.day desc
LIMIT 1

List contacts to a person without a person page

If the person is a link to a nonexisting page:

TABLE WITHOUT ID 
file.link AS "Contact note", 
day AS "Contact date"
FROM [[Paul]] AND "10 Example Data/dailys"

... or if the person is a textual metadata field:

TABLE WITHOUT ID 
file.link AS "Contact note", 
day AS "Contact date"
FROM "10 Example Data/dailys"
WHERE contains(person, "Christa")