Conditional Statements
Conditional statements can be used to determine whether text should be included in the message or to choose alternate wording based on attribute values.
Whole paragraphs can be included or omitted based on conditional tests.
#if ($remindersRemaining > 0)
This work item will escalate after $remindersRemaining more reminder(s).
#end
Additionally, parts of a paragraph or sentence can be suppressed or altered based on conditional evaluations. In this example, if $requester is null, the portion of the text "requested by $requester.displayableName, and" is suppressed. Specifying the #if statement in-line with the rest of the text prevents extra line breaks in the middle of the sentence in the resulting email message.
<Body>This is your $ordinalNumReminders reminder that the work item $workItemName #if($requester)requested by $requester.displayableName, and #{end}created on
...
Attribute values can also be evaluated to determine which of multiple text selections to include in a message:
#if ( $launcher != $identityName )
$launcher requested the following password changes be made to your account(s).
#else
The following password changes were made to your account(s) at your request.
#end