13
Views
3
Comments
Solved
Remove duplicate record from list

I am getting data from restful service and have duplicate records. I wanted to remove these duplicate records.

I have tried using ListDistinct  function with no luck. In following screen, GetCredits is restful services and it is returning duplicate record. Please note I can't control SQL. So i will need to remove duplicate value programmatically. 


Rank: #246
Solution

Your credit_id is different. this is why the distinct function doesnot see it as the same record.


If this field does not make your record different, you could create another list without that field and do a distinct.

Rank: #51794

Thanks for point that out. It worked.  I have added following code and stored in local variable to get a unique list.



Rank: #2277

Hi Sarah? 


Did you already try to save the information in one variable and use the list distinct?

If it does not work, loop your entire list against every record in the list using any unique identifier in the list.

Rank: #246
Solution

Your credit_id is different. this is why the distinct function doesnot see it as the same record.


If this field does not make your record different, you could create another list without that field and do a distinct.

Rank: #51794

Thanks for point that out. It worked.  I have added following code and stored in local variable to get a unique list.