If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.
Change List
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.
Introduction
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.
Properties
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:
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.
List
The name of the list to be changed.
Type
Defines the type of change that is applied to the list.
Option | Description |
---|---|
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. |
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).
Value
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.