How to remove repeated Items from a collection
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-12-17 09:29 PM
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-12-17 07:01 AM
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-12-17 02:57 PM
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("",""))
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
26-12-17 10:40 PM
You can use code stage and LINQ query for getting distinct items. way faster than iterating in loop.
