Switch
The Switch function is a type of selection control mechanism used to allow the value of a variable to change the flow of control of the execution of application logic.

Cases : It is a dynamic entry var, that is, you can add as many as needed by the user to compare the value of a variable or expression.
The field to be compared is added by name and then the + icon is clicked to add the case.
Value : It is the value to evaluate, it can come from a variable, control or function
Step by Step :

Default : It is executed when none of the values declared in cases match.
Cases: For each Case that is opened from the entry vars, a callback will be created, with the same name of each case. Each one of them will be activated when the evaluated value is equal to the case. Returning the evaluated value.
OutVars
{
"return": {
"timestamp": 1662146155637,
"args": "verde"
}
}Cuando el valor evaluado no coincide con ninguno de los casos (cases) entonces se activa el callback Default. Este callback, no retorna nada.
Se podría comparar el switch como un conjunto de funciones condicional usando el operador ==

Last updated
Was this helpful?