cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove repeated Items from a collection

Gilberto.lopez
Level 3
Hi everybody, I want to delete rows from a collection that are repeated but without have to go through the collection verifying one by one because i have more than 4000 rows so it would be very slow. i hope someone can help me. Thanks!
3 REPLIES 3

SudheerReddy
Level 4
Let's assume Collection1 has the data, you need to delete the duplicates from. Create another collection with the data as in Collection 1. Now, create a flow to check each row from Collection1 matches any row in Collection2. If matches, use the action Delete Row.

John__Carter
Staff
Staff
You could try a code stage with these two lines. The Column_Names input is a collection listing the names you want in the output collection. The code creates an output collection where each row is distinct. Dim v As New System.Data.DataView(Collection_In) Collection_Out = v.ToTable(true, Column_Names.Split("",""))

JivankumarKedar
Level 3
You can use code stage and LINQ query for getting distinct items. way faster than iterating in loop.