Skip to main content

DTL <case>

Execute a block of actions within a <switch> element when the specified condition is met.

Syntax

<switch>
   <case condition="1">
   ...
   </case>
   <default>
   ...
   </default> 
</switch>

Attributes

Attribute Description Value
condition Required. An ObjectScript expression that, if true, causes the contents of the <case> element to be executed. An expression that evaluates to the integer value 1 (if true) or 0 (if false).

Elements

Element Purpose
<annotation> Optional. A text string that describes the <case> element.

Description

The <switch> element contains one or more <case> elements. The elements within a <case> element are executed if the condition evaluates to true.

FeedbackOpens in a new tab