Defines an IF...THEN...ELSE... conditional statement based on a JavaScript condition.
The IfThenElse statement is one of the HTML transaction conditional statements. It contains two child steps (Then and Else) which are executed depending on the condition fulfillment:
• Then step and child steps are executed when the condition is verified,
• Else step and child steps are executed when the condition is not verified.
The condition, defined in the Condition property, is a JavaScript expression that is evaluated during the transaction execution as true or false.
Note: In Convertigo Studio, when an IfThenElse statement is created in a handler, it can be easily replaced by an If, using the right-click menu on the statement and choosing the option Change to > If. The Condition property remains the same and the statements present in the sub-statements are:
• statements present in the Then statement are moved to the If,
• statements present in the Else statement are deleted.
Property | Type | Category | Description |
---|---|---|---|
Comment | String | standard | Describes the object comment to include in the documentation report. This property generally contains an explanation about the object. |
Condition | JS expression | standard | Defines the block condition expression. This property is a JavaScript expression that will be evaluated as condition (true or false) in order to decide whether to execute or not the child statements. |
Is active | boolean | standard | Defines whether the statement is active. |