How to get a comma separated list instead of an unsorted list from multiple values in multiple files?

What I’m trying to do

TL;DR: Dataview outputs as a comma separated list instead of an unsorted list

I get:


  • [[A Great Movie]]
  • [[Crap Movie]]
  • [[Also A Good Movie]]

What I would like:

Movies: [[A Great Movie]], [[Crap Movie]], [[Also A Good Movie]]

Let’s imagine my Vault consists of Notes for movies and notes for actors. Each movie note contains metadata with the actors listed if they are in the movie, either in YAML

Title: A Great Movie
  Actor Person
  Also Actor


Title: Also A Good Movie

Actors:: Third Actor, [[Also Actor]]

Then on each actors notes, I would like Dataview to output which movies the actor is in.

e.g. Also Actors page lists: [[A Great Movie]], [[Also A Good Movie]]
but Actor Person’s note only lists: [[A Great Movie]]

I can get Dataview to correctly list the relevant movie pages, but only as an unsorted list.

Things I have tried

I got as far as the following (which works fine):

WHERE contains(Actors, OR contains(Actors,
SORT asc

WHERE has an OR so I can capture both unlinked YAML and linked inline fields. Maybe there is a better way to do this but I’m new at this and it has taken me the entire day to get just this far :confused:

I’m about ready to rip my hair out in frustration. I thought it was “join” as per here: Functions - Dataview but I can’t for the life of me to get it to work.

If I do:

LIST join(, ', ')
WHERE contains(Actors, OR contains(Actors,
SORT asc

I get:

  • [[A Great Movie]]: A Great Movie
  • [[Crap Movie]]: Crap Movie
  • [[Also A Good Movie]]: Also A Good Movie

Doing a LIST join(, ', ') AS test I get a

Dataview: Error: 

I’ve looked at examples (and the documentation obviously) but I just can’t understand how to get a comma separated list.

Help much appreciated!

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