Creating a unique collection in flow

this is a very short post, that shows one small thing that can be very useful - creating a collection of unique elements in visual workflow

there are now quite a few operators on collections in flow, but none of them are ‘remove duplicates’ or ‘add if new’ or anything like that.

i found a way to do this that requires only a single assignment element - no extra loops or decisions to evaluate if the collection already contains the element required.

This assignment would run within a loop, and would build the collection. The new transform element can build the collection in one step, but it would still need to be deduped.

step 1 : remove all instances of (X)
step 2: add (X)

uniqueIDs.png

this ensures that your collection will only contain one copy of the element.

maybe there is an easier way, but this works!

 
103
Kudos
 
103
Kudos

Now read this

Single Sign On from Production to Sandbox

Make it oh-so-easy for users to test changes in a sandbox by seamlessly logging in from production! Summary: With this approach, your users can login to a sandbox directly from the app launcher in production. This requires no code, just... Continue →