From f49ab78ebd33726914c12f6610da7a10d3f8162b Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 5 Aug 2019 14:28:59 +0100 Subject: [PATCH] Docs: Add another example to Conditional Operators --- editions/tw5.com/tiddlers/filters/Conditional Operators.tid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editions/tw5.com/tiddlers/filters/Conditional Operators.tid b/editions/tw5.com/tiddlers/filters/Conditional Operators.tid index 989f81f15..7028e6dad 100644 --- a/editions/tw5.com/tiddlers/filters/Conditional Operators.tid +++ b/editions/tw5.com/tiddlers/filters/Conditional Operators.tid @@ -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]]">> <>