21
Views
3
Comments
Solved
How to check duplicates in list - OutSystems 11
Question

Hello All,


I am having list of structure and I want to validate the list if it has any duplicate value.


Any one having any suggestions. I was trying to use foreach loop but not sure how I should implement. 

mvp_badge
MVP
Rank: #18
Solution

Hi Neeraj,

1. Sort the list.

 2. For each on sorted list

3. Compare current with previous element [current -1]

4. If current equals previous you have a duplicate

Regards,

Daniel


Rank: #90

Hi Neeraj,

You can use ListDuplicate action -

see below image



Regards

Rahul

mvp_badge
MVP
Rank: #18
Solution

Hi Neeraj,

1. Sort the list.

 2. For each on sorted list

3. Compare current with previous element [current -1]

4. If current equals previous you have a duplicate

Regards,

Daniel