I am trying to use dataview to make a table to combines several fields into a single column, and displays multiple entries for a given file with a linebreak between them.
The application here is a media journal. For instance, I use the following code:
table TvLog + MusicLog + ReadingLog as "media" where TvLog + MusicLog + ReadingLog != null sort file.day desc
In the case of a Daily Note with both a TvLog and MusicLog entry, the query results in an entry like this:
Date | TvLogEntryMusicLogEntry
What I want is an entry like this:
Date | TvLogEntry | MusicLogEntry
Things I have tried
I have a workable but non-ideal solution. I manually coded in line breaks between the fields like so:
table TvLog + "<br>" + MusicLog + "<br>" + ReadingLog as "media"
This works, but null values give me a headache because a day with just a MusicLog entry reads as:
Date | - | MusicLogEntry | -
Changing the settings for Dataview to render null as nothing only helps marginally, because the manual breaks are in there, so the dashes disappear but the empty space remains.
I can live with this if I must, but it’s irking me because there has to be a better way, right?!