if(): fall back to Guest when a name is missing
Easy
Return the name when there is one, and "Guest" when there is not.
"Not one" covers both a null and an empty piece of text, so a plain isnull() is not enough on its own.
Input
ri!name— Text, and it may be null
ri! Rule Inputs
ri!nameText"Mani"
Example 1 — A real name
Input: ri!name
"Mani"
Output:
"Mani"
Example 2 — Null
Input: ri!name
null
Output:
"Guest"
Example 3 — Empty text
Input: ri!name
""
Output:
"Guest"
Example 4 — A name that is just a space
Input: ri!name
" "
Output:
" "
Appian Expression Tips
- • Use
ri!variableNamefor rule inputs - • Use
a!localVariables(local!x: …, body)for locals - • Use
a!forEach(items: …, expression: fv!item)to iterate - • Use
where()/reject(fn!isnull, list)to filter