How to check for duplicates in a list
Fresh Cut Grass Posts: 65
11/19/2021
|
I've got a long list of string values that I need to check for duplicates. Is there a step that can do this so I don't have to check this manually?
|
|
0
link
|
amber.blanton@decisions.com Administrator Posts: 72
11/19/2021
|
Yes, we actually support a couple ways to do this.
Regarding steps, there is the Get Distinct List of String step. You can map the list you want to check for its Input, and it will make a new list automatically removing duplicates for its output. The attached GIF named after this step demonstrates the removal of the duplicate Item3 in the example list.
Depending on the version you are running, we also have a pre-built 'Get Unique Strings from List' Flow available to search in the Toolbox to enter into your workspace as a Sub flow. When placed into your workspace, set its input to the list you'd like to check and, like the Get Distinct List of String step, it will automatically detect and remove the duplicates from the original list.
However, since this is done within another Flow, you can modify its logic to fit other needs in your process such as moving the duplicates to a separate list rather than deleting them by default. This also helps with organization. The GIF attached demonstrates this Flow.
|
|
0
link
|