Definition and Usage
This command adds an item at the specified position in a list. You can choose to add the item either at the end of the list or at a specific position using an index number.
Parameter Values
Input parameters
Parameter | Description | Possible Values | Required | Options / Notes |
List | Select a list variable to add new item to |
| Yes |
|
Insert to | Specify whether to insert the item at the end of list or a specific position | End of the list, Specified position | Yes |
|
Index | Indices start from 0, where 0 represents the first item, 1 represents the second item, and so on |
| Yes (if "Specified position" is selected) | Negative indices are also supported, where -1 represents the last item, -2 represents the second-to-last item, and so on |
Add item | Enter a value or select a variable to add to the list |
| Yes |
|
Error handling
Parameter Name | Description |
Throw error & stop | When an error occurs, the action will trigger an error and stop the execution of the entire app. |
Retry command | If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process. |
Ignore error & continue | When an error occurs, the action will be ignored, and the workflow will continue without interruption. |
Variables produced
This action doesn't produce any variables.
Using Variables in Conditions
You can use variables in the "List" and "Add item" fields by clicking the {x} button or selecting from previously defined variables. When using the "Index" parameter with a specified position, you can also use a variable that contains a numeric value.
Notes
The list must be properly initialized before using this command.
When using the "Specified position" option, ensure that the index value is valid for the list; otherwise, an error will occur.
If you use an index that is out of bounds (too large or too small), the command will fail.
Adding items to very large lists may impact performance.