This activity can be used in both Microflows and Nanoflows.
Note that there are minor differences between the way this function works in microflows, and the way it works in nanoflows.
The Change list activity allows you to change a list by adding objects to, and removing objects from, it. The activity works directly on the list provided, in contrast to the List operation activity.
An example of change list properties is represented in the image below:
There are two sets of properties for this activity, those in the dialog box on the left, and those in the properties pane on the right.
The change list properties pane consists of the following sections:
3 Action Section
The Action section of the properties pane shows the action associated with this activity.
You can open a dialog box to configure this action by clicking the ellipsis (…) next to the action.
You can also open the dialog box by double-clicking the activity in the microflow or right-clicking the activity and selecting Properties.
The name of the list to be changed.
Defines the type of change that is applied to the list.
|Add (default)||The object(s) in the value property are added to the list. See notes below for additional information.|
|Remove||The object(s) in the value property are removed from the list. If there are duplicate objects in the list, then only one will be removed. If you ask to remove an object which isn’t in the list, there is no error.|
|Clear||The list is emptied.|
|Replace||The list is emptied and the object(s) in the value property are added to the list.|
3.2.1 Notes When Using the Add Type
If you do not want duplicates in your (microflow) list, you can either remove the object(s) first, or use the Contains list operation to examine the list before adding the object(s).
Currently, this works differently in nanoflows and microflows. In a nanoflow objects will not be added if they are already in the list whereas, in a microflow, the same object can be added multiple times.
Value defines the objects that are used to change the list. The value is entered using an expression. The expression must result in an object or list of objects of the same type of entity as the input list.
4 Common Section
For more information on properties in this section, see Common Properties.