On Saturday, August 15, 2020 at 10:47:33 AM UTC-7, Mark S. wrote:
>
> What I don't understand, is why this filter didn't work :
> [{!!name}else{!!title}]
> If name doesn't exist, then it doesn't display anything, despite the
> definition of "else"
>
> if the list of input titles is empty then return a list consisting of a
>> single constant string, otherwise return the original titles
>
> Without "name", then {!!name} should be empty and the "else" operator
> should kick in. But it doesn't.
>
The "else" filter only works if the preceding filter produces NO result...
but if the {!!name} field exists, it has a value... it's just blank text.
In contrast, note that the documentation for "get[...]" (
https://tiddlywiki.com/#get%20Operator) says this:
If the corresponding tiddler contains field F, *and the value of this field
> is not empty*, then its value is appended to the output.
Thus, when you write "get[name]", if name is blank then there is *no filter
result* -- as opposed to a value which happens to be blank.
-e
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/e951045e-5dd3-4067-a7f1-329691e4131co%40googlegroups.com.