Removing Duplicate Values From a List
  • 12 Mar 2021
  • 1 Minute to read
  • Dark
    Light

Removing Duplicate Values From a List

  • Dark
    Light

Article summary

Example Lab Article
While Example Lab projects are resources for public use, articles and assets are not actively maintained. Screenshots and features are from the specified version below. These references may become dated as new versions are released.


Overview

Example Lab Details

Version6.9.2
Root FolderExample Lab - Remove Duplicate Items from a List
Modules None
DependenciesNone

This Example Lab project demonstrates how to filter through a List and remove any duplicate values.


Explanation

The Remove Duplicates Flow checks field 1 and field 2 for duplicates. The List item will only be removed if both fields 1 and 2 are a match for another List item. This works by using a ForEach Step to iterate between each List item individually. The first item is added to the new unique items List by default to avoid checking against an empty list, but every item after that is only added if it does not already exist in the List. This is accomplished using a Rule that determines whether the items in field 1 and field 2 already exist as a List item. If one or both field values do not already exist the item will be added to the List. In order to test this Flow, there is a unit test provided in the Debugger that can be run as an example.

Reference Articles



Project Download

The examples attached were developed to be instructional and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact services@decisions.com. Import the project below to a Decisions environment on version 6.9.2 or later using our Importing/Exporting article.





Was this article helpful?