Remove Same values from the List

Hi all,

I am having a record list structure which contains repeated sequence of same elements and one or more unique elements. I want to retrieve only the Unique elements from the list.

Method which I applied ,using List distinct returns all the elements by removing the duplicates but I want only the Unique element from the list.Please advice..

Hello Saravanan,

What you want is not done so you need to create a function for that.

The easiest algorithm goes like this:

I'd recommend you use the full list, one of those distinct lists, and one empty list.

Loop the Distinct and search in the full list. If the element appears only once, add it to the empty list.

Repeat until the distinct list is over.

The empty list will be full with the uniques.