How to deal with empty values in dataview en Templar

What I’m trying to do

In dataview I combine two or more values with a “-” but if one or more are empty I end up with " - - - "

With Templar I read some values of the properties and write tem into the body text, if this value is empty Templar write “null”

Things I have tried

I have search forums, did some goole but I could not find a solution to this.

It would help if you showed an actual example, and the code you are using. Then people can test or help improve it.

For dataview:

	Table without ID
		link(file.name, Titel) As titel, embed(link(cover, "150")) AS Cover, (Serie + " - " + Serienummer),
		choice(gelezen , ":LiSquareCheckBig: gelezen", ":LiSquareX:") as gelezen,
		join(file.tags, " / ") as Tag
		FROM "02 - Multimedia/02 - Boeken/Boeken"
		WHERE Schrijver = this.file.name
	SORT Leesvolgorde, Serie, Serienummer

Templar

[[<% tp.frontmatter[“Schrijver”] %>]]

Reeks: <% tp.frontmatter[“Serie”] %>

<% tp.frontmatter[“calibreURL”] %>

1 Like