How to create a table with folders in the first column and all notes under those folders that contain this.file listed in the second column?

I have Memory Impairment (possible early onset Alzheimer’s) and I am REALLY struggling to wrap my head around Dataview but especially with what I am trying to do.

As my memory degrades, I am relying more and more on ‘digital memory’. I am trying to create something like an expanded address book with the following structure:

> Organisations
- Acme Inc
- BigCorp
- Small Local Ltd

> People
- Jim Smith
- Jane Doe
- Terry Li

> Meetings
- 2023-03-14
- 2023-02-01
- 2022-12-09

> Newsletters
- 2023-01-01 - First Half
- 2022-06-01 - Second Half

Where ‘>’ denotes a folder and ‘-’ denotes a note/file under that folder

Each note in Organisations and People have info about the individuals. Small Local Ltd may have Jim Smith linked either as YAML, an inline field or a backlink since he works there. Newsletters may mention people and organisations. Meetings may take place at certain organisations with certain people present. All either in the YAML, inline fields or linked.

What I’m trying to do

On the people notes, I would like a table that looks like this:

Organisations [[Acme Inc]], [[BigCorp]]
Associates [[Jane Doe]], [[Terry Li]]
Meetings [[2022-12-09]]
Newsletters -

I don’t mind if the list in the second column is an actual bulleted list so long as it works! I have been hammering away at this non-stop for several days and just can’t get my brain to work out how to do this :frowning:

I have, for example

FROM Organisations
WHERE contains(People OR contains(People, OR contains(this.file.inlinks,

for getting where people are linked in an Organisation but I can’t work out how to get this information collated with other sources (such as Meetings, Newsletters, etc.) and laid out as per the table above.

Help deeply appreciated!

I’ve gotten a little bit further by myself with this:

TABLE WITHOUT ID AS "", file.folder AS " "
WHERE contains(People, OR contains(People, OR contains(this.file.inlinks,

placed in notes for people so that it shows anywhere that someone is named in YAML, inline fields or links.

However, the output looks like this:


Each note/file is listed in it’s own row instead of being grouped. So where someone was at two meetings, it shows as two rows, instead of one row with two links, like this:


I would ideally also like the columns in reverse order but I can’t work out how to do that either :frowning:

The following is untested, but it might be what you’re looking for:

WHERE contains(People, 
   OR contains(People, 
   OR contains(this.file.inlinks,
GROUP BY file.folder as "Something"

I don’t fully understand your request, but this should group the files together to make the multiple rows you’re asking for, and reverse the order of the columns. I’ve named them “Something” and “People” just to illustrate where/how to rename them.

The GROUP BY make sure it gather together multiple files, but this also requires to change the file.links into rows.file.links.

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