Removing Duplicates from a List

Removing Duplicates from a List

Comments

  • Hey!

    I have a list that uses a defined data structure, how do I remove duplicates from this list?

    Thanks in advance!

  • Hi Lee,

    If you only need a list of strings that removes any duplicates, you may use a step called Get Distinct List of String.

    Otherwise, you can also follow these steps:

    1) Create a flow that will take your list as an input and use a ForEach loop to iterate through each item.
    2) In this ForEach Loop, youll want to build a new list that will have no duplicates based on the logic placed in this ForEach.
    Add rules to evaluate if an item is a duplicate by checking if the object is already in the list. If the item is not a duplicate use the Add Item to List step to build up anew list.
    3) The resulting output of this flow will be the updated list you created in the ForEach step.

    For more information on the ForEach Step see: [url=https://documentation.decisions.com/docs/processing-lists-of-items-with-the-foreach-step]https://documentation.decisions.com/docs/processing-lists-of-items-with-the-foreach-step[/url]

    I have also attached a step by step text file for your reference. If you have any more questions, please dont hesitate to contact me.

Sign In or Register to comment.