Type
Condition item
Available from
Data Node in the Call Flow Editor
Purpose
The else if item is used for building complex if/else logic. With the Condition item, you can select and play different prompt or data flow segments based on various conditions. The else if introduces a new "nested if" condition. If the If condition fails, the else if item makes it possible to compare the value of a selected variable, the Left Variable or Left Variable Field with:
- The value of another variable or variable field
Based on the result of the comparison, the system responds according to what is assigned to the else if item, or continues on.
Behavior
The behavior of this item depends largely on the conditional Operator you select. When the condition satisfies, the application plays the prompt segments assigned to the else if item. For more information about conditional operators and how to use them, see Conditional Operators.
Dialog Designer executes the else if statement only if the preceding if expression and any of the preceding else if expressions are evaluated to FALSE, and the current else if expression is evaluated to TRUE.
Properties
- Left Variable - Select the variable you want to use to make the comparison.
- If you select a simple variable, use the variable for the comparison.
- If you select a complex variable, you must also select a variable field from the Left Variable Field list for the comparison.
- Left Variable Field - If you have selected a complex variable in the Left Variable field, select the field that you want to use to make the comparison. If you have selected a simple variable in the Left Variable field, this field is inactive and no choices are available.
- Compare - Select the conditional operator you want to use to make the comparison. For more information about conditional operators and how to use them, see Conditional Operators.
- Value - Enter a literal or a constant value you want to compare the Left Variable or Left Variable Field with.
- For example, if you want to compare the account balance to see if it has a minimum value of at least $2000, and if it has, you want to play another prompt. To do this, enter $2000 in the Value field and the appropriate conditional operator in the Compare field.
Note:
If you use the Value field, you cannot use the Right Variable field.
- Right Variable - Select the variable you want to compare with the Left Variable or Left Variable Field.
- If you select a simple variable, use the variable for the comparison.
- If you select a complex variable, you must also select a variable field from the Right Variable Field list for the comparison.
Note:
If you use the Right Variable field, you cannot use the Value field.
- Right Variable Field - If you have selected a complex variable in the Right Variable field, select the field that you want to use to make the comparison. If you have selected a simple variable in the Right Variable field, this field is inactive and no choices are available.