A Switch Panel is used to evaluate an interaction variable and enable different output paths or execution based on the comparison result. It is commonly used to make decisions based on user input or other dynamic factors.
Configuration
The Switch Panel is configured using three main parameters:
Variable Name: A string value that represents the variable to compare. This could be any variable in the program, such as user input or a calculated value.
Value to Evaluate: This parameter defines the value(s) to compare the current variable value against. Multiple values can be specified, separated by commas. The comparison can be a string or numerical value.
Operator: The operator is used when comparing the current variable against all specified comparison values. Common operators include equals, greater than, less than, greater than or equal to, less than or equal to, and not equal to.
Exit Paths
The Switch Panel creates different exit paths based on the matches that are added to it. Each match that is added creates a new exit path, which can be linked to another panel.
The Switch Panel has three default exit paths:
Default: If none of the matches evaluate to true for the provided variable, the default exit path is used.
Invalid Input: If one or more of the configuration inputs was invalid, the invalid input exit path is used.
Custom Added Matches: Any exit paths created for added matches that evaluate to true.