Empty line between multiple values returned by a query

Things I have tried

What I’m trying to do

I have notes with multiple entries for a single inline tag, for example, in one note:

test:: Gutta cavat lapidem.

test:: Saepe cadenda.

These entries are typically longer, so the yaml header seems inconvenient.

I use this dataview code:

TABLE test as "test"
FROM [my path here]
WHERE contains(test, "")
SORT date(filename) desc

Is there a way to add an empty line between rendered results of these two inline tags, to have some space between multiple returned values in each table row?

Basically, I am trying to use dataview to transclude (copy) parts of daily notes (marked with inline tags) into a summary note. If there is another, easy way to do this, I will be grateful for a pointer.

Any use?

test:: Gutta cavat lapidem.

test:: Saepe cadenda.

```dataview
TABLE 
	test
FROM 
	"_inbox"
WHERE 
	contains(test, "")
FLATTEN
	test
SORT 
	filename
	DESC
```

BTW, it seems you don’t need to use contains:

test:: Gutta cavat lapidem.

test:: Saepe cadenda.

```dataview
TABLE 
	test
FROM 
	"_inbox"
WHERE 
	test
FLATTEN
	test
SORT 
	filename
	DESC
```

Yes, that works. Also, great to learn about ‘flatten’. Thank you!

While it’s true that in some cases you don’t need the contains after flattening a value, also do note that in some cases the value isn’t flattened in all contexts.

This is way I tend to rename the flattened value, to avoid such edge cases. In some cases if you flatten like @eightning did here, and you try to do some checks on it in a WHERE clause, you might discover that it hasn’t been flattened yet, or that it’ll use the original value (of a list).

So, this is not to say that the solution provided doesn’t work in this particular case, but more a word of warning, that in my experience you’re usually better of doing stuff like FLATTEN test as T (or some other alias which make sense in your setting), as you’ll not see unwanted side effects of test being either a single value or a list depending on context.

1 Like

Thanks. Way beyond what I understand at the moment but something for me to study, study, and study again. :face_with_spiral_eyes::cold_sweat::exploding_head:

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