Add to list if it is not in the list already

2
Hi there, I'm iterating over some list and retrieve an associated object, which I want to add to a list. The problem is that I only want to have unique entries in my list. How can I easiest make sure these are unique? (I'm thinking about iterating the list to check if the new entry is not in the list and then add.... but perhaps there is a better way?)
asked
2 answers
7

You could add a list operation and select Intersect as operation type, and add the same list as variable 1 and 2, this will have a set as output which can't have duplicate items in it. It's a slight workaround because we don't make a difference between sets and lists in our microflows, it would be confusing to non-technical people.

answered
0

It is impossible for an object to occur in a list twice. In other words, if you add an object to a list, that is already there, nothing will happen, so objects in a list are always unique.

answered