Actions: Control Structures
break
Break out of the current control structure and continue.
case
Create a case to use within a switch control structure.
Argument | Description |
---|---|
Value | The value to set variable to (input or another variable) |
catch
Defines the block which runs when a try structure encounters an error.
Argument | Description |
---|---|
Variable | The variable to store the error, if one occurs |
else
Adds a block for ‘all other cases’ of a control structure.
else if property
Additional condition to check the value of a property.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
Operator | The comparison operator to use |
Value | The value to compare to |
else if variable
Add an additional if condition to an existing control structure block, referencing a variable.
Argument | Description |
---|---|
ThisValue | The value to set variable to (input or another variable) |
ThisVariable | The variable to set the value of. |
Operator | The comparison operator for comparing values in the table against the input value. |
end if
Marks the end of a IF/ELSEIF/ELSE structure.
end repeat
Marks the end of a repeat structure.
end switch
Marks the end of a switch structure.
end try
Ends a try block.
exit repeat
Exits the repeat current repeat loop.
exit script
Exits the current script.
finally
Runs all lines below it, inside a try structure, whether there is an error or not.
if property
Creates the first condition referencing a property.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
Operator | The comparison operator to use |
Value | The Value to compare to |
if variable
Creates the first line of an if condition referencing a variable.
Argument | Description |
---|---|
ThisValue | The value to set variable to (input or another variable) |
ThisVariable | The variable to set the value of. |
Operator | The comparison operator for comparing values in the table against the input value. |
next repeat
Skips the rest of the repeat control structure and returns to the top for the next repeat.
repeat
Repeat a code block n number of times.
Argument | Description |
---|---|
Number | Specify the number of times the repeat block will run |
repeat over array
Repeat loop over the indexes or keys of an array.
Argument | Description |
---|---|
RepeatOver | Repeat loop over indexes or keys? Indexes are numeric, keys are strings like IDs. This action will repeat over every index in the array in order from lowest to highest. Or in an undetermined order of the keys. Note: If the number of indexes or keys changes during the loop, the new key or index will be included as part of the initialization of the next repeat. |
ArrayVariable | The array variable whose indexes or keys you want to loop over. |
ArrayPath | The path of the array key which contains the indexes or keys you want to repeat over. Expressed in ‘/key1/key2/’ format. |
IndexKeyVariable | The variable to hold the current index or key. Note: When using repeats inside repeats,this variable must be different. |
switch property
Begins a switch block where the value of a property is compared.
Argument | Description |
---|---|
Element | The element to have its property compared. |
Property | The attribute that is to be compared. |
switch variable
Begins a switch block where the value of a variable is compared.
Argument | Description |
---|---|
Variable | The variable to use in the SWITCH control structure |
try
Runs the code within its block, and returns and runs the catch block if an execution error occurs.
This chapter was last updated on Thu 5 Dec 2024 15:57:49 GMT