Add or replace as a new option for Change list - Mendix Forum

Add or replace as a new option for Change list

6

Very often when you collect entities in a list, you want only unique entities to be collected in the list. 

But if you use the change list activity with the “Add” option, the same entity can appear multiple times in the list. The “Replace” option is not a solution, because to replace the entity should exist in the list which is not the case the first time you'll find it.

See the example below. I'm collecting the languages linked to the users and I want the unique languages. The encircled part can be replaced by a “Add or replace” or “Add if not exists” option.

asked
1 answers

to remove doubles, you can use Union list activity.

(I also got caught out, expecting lists to only capture unique IDs.)

(hope this helps any future ppl out)

Created