- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-07-21 12:20 PM
Hope someone can assist with the below please.
I have a collection which contains 2 columns of data. [ID Number] and [Surname]. I would like to remove duplicate ID numbers from this collection and place them into another collection. So i will be left with only unique ID numbers in my original collections.
Does anyone know how I could do this without the use of a code stage.
Thank you
------------------------------
Rinesh Singh
------------------------------
Answered! Go to Answer.
Helpful Answers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-07-21 02:47 AM
Hi Rinesh,
Using code stages/custom object is easier.
But if your business has restrictions, could try the below method.
1) Create an empty collection (ColB), assume existing collection is ColA
2) Do a nested loop starting with ColA, if row does not exist in ColB, add row to ColB.
3) You can choose whether to delete or retain the copied row in ColA.
Hope this helps.
Thanks,
Avinash
------------------------------
Avinash Ramkumar
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-07-21 01:01 PM
Blue Prism Digital Exchange
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
America/Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-07-21 01:48 PM
Thank you for your help!
I have had a look at the package on the link you provided but it does not make mention of "remove duplicates", The guide for vbo outlines the below as included in this asset.
Options included in the utility:
• Append Field (Number)
• Append Field (Text)
• Append Rows to Collection
• Collection Contains Field
• Collection Contains Value
• Copy Rows
• Delete Column
• Delete Field
• Field Exists
• Fill Blanks
• Filter Collection
• Get Collection Fields
• Merge Collection
• Read Collection Field
• Remove dots from headers
• Remove Empty Rows
• Remove Null Rows
• Rename Collection Fields
• Rename Field
• Reverse Collection
• Set Collection Field
• Set Column Names From Expected Collection
• Set Column Names From First Row
• Sort Collection
• Split Collection
• Transpose Collection
------------------------------
Rinesh Singh
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-07-21 02:24 PM
Write a code stage with this code
Dim pNewDataTable As DataTable
Dim pCurrentRowCopy As DataRow
Dim pColumnList As New List(Of String)
Dim pColumn As DataColumn
For Each pColumn In Input_Col.Columns
pColumnList.Add(pColumn.ColumnName)
Next
pNewDataTable = Input_Col.DefaultView.ToTable(True, pColumnList.ToArray)
Out_Col = Input_Col.Clone
For Each pCurrentRowCopy In pNewDataTable.Rows
Out_Col.ImportRow(pCurrentRowCopy)
Next
And make the following outputs and inputs
Input:
Output:
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
America/Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
15-07-21 08:30 PM
------------------------------
Rinesh Singh
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-07-21 02:47 AM
Hi Rinesh,
Using code stages/custom object is easier.
But if your business has restrictions, could try the below method.
1) Create an empty collection (ColB), assume existing collection is ColA
2) Do a nested loop starting with ColA, if row does not exist in ColB, add row to ColB.
3) You can choose whether to delete or retain the copied row in ColA.
Hope this helps.
Thanks,
Avinash
------------------------------
Avinash Ramkumar
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-07-21 07:50 AM
------------------------------
Rinesh Singh
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-07-21 10:55 AM
i have an error on line 3 when pasting into code stage, How can i correct it error?
Thank you
------------------------------
Jiri Husner
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-07-21 02:40 PM
------------------------------
Emerson Ferreira
Sr Business Analyst
Avanade Brasil
America/Recife
+5581988869544
If my answer helped you? Mark as useful!
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-06-22 11:57 AM
iam getting whole CollA to CollB.
Thanks and Regards,
DevendraNath
------------------------------
Devendra Maganti
------------------------------
