Docs: Add another example to Conditional Operators

fix-syncer
Jeremy Ruston 2019-08-05 14:28:59 +01:00
rodzic 41d3e80397
commit f49ab78ebd
1 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -19,6 +19,10 @@ The conditional operators are:
These operators can be combined. For example:
* <<.inline-operator-example "[[New Tiddler]is[missing]then[I am missing]else[No I am not missing]]">>
<<.inline-operator-example "[[New Tiddler]is[missing]then[I am missing]else[No I am not missing]]">>
The [[else Operator]] can be used to apply a defaults for missing values. In this example, we take advantage of the fact that the [[get Operator]] returns an empty list if the field or tiddler does not exist:
<<.inline-operator-example "[[HelloThere]get[custom-field]else[default-value]]">>
<<list-links "[tag[Conditional Operators]]">>