Update List Item
AutomatR.DefaultActivities.List.UpdateListItem<T>
The "Update List Item" activity in AutomatR, categorized under List, allows you to update the value of a specific item in a list. This is useful when you need to modify the content of an element at a particular index in the list.
Properties
Name | Description |
---|---|
Input | |
Index Number | Specifies the index of the item you want to update in the list. It represents the position of the item to be updated. Integer variables containing the index value. |
List | Specifies the list from which you want to update the item. It represents the list containing the item to be updated. Variables of type List\<T> containing the data. |
Updated Item | Specifies the new value that should be set at the specified index in the list. It represents the updated content for the list item. Variables of type T containing the updated value. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Update List Item" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the wait time is 1000 milliseconds or 1 sec, i.e., 1. |
How to use:
- Drag and drop the "Update List Item" activity onto the workflow.
- Configure the properties, specifying the list from which to update the item, the index of the item to be updated, and the new value to set.
- Optionally, configure the delay and customize the display name.
- Execute the workflow to update the specified item in the list.
Example: Consider an example where the "Update List Item" activity is used to modify a string item in a list:
Update List Item:
List: myList
Index: 2
Updated Item: "NewValue"
In this example, the activity updates the item at index 2 in the list named "myList" with the new value "NewValue."