- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-06-22 12:11 PM
you need to take reference of column of that collection like Data1.x and check the value in other collection.
P.S - go with code approach. extend your vbo with code stage. That will save the iteration time of collection.
------------------------------
Neeraj Kumar
Technical Architect
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-06-22 02:20 PM
Hi Devandra,
Steps to be followed here is.
1. Take one empty collection assume it Coll B and assuming existing collection is A.
2. Now start loop for Coll A
3. Start Loop for Coll B
4. Compare both collection values , If Yes do nothing, If No copy the coll A value to Coll B
5.Loop Coll B Ends.
6. Loop Coll A Ends.
------------------------------
Aravind Babu
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-03-23 09:05 AM
Hi Aravind,
Is this the solution u suggested? I did it but it didn't get to the decision stage in the loop. I need to check duplicates for 2 out of 3 column. Means that the value in column 1 AND column 2 should not have any duplicate in other rows.
Thanks
------------------------------
Nafiz Zainal
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-03-23 09:39 AM
Hi Nafiz
Please can you paste the syntax in decision stage
and one more thing is there any restriction in using code stage.
Regards
Lakshmi Narayana
------------------------------
Lakshmi Narayana
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-03-23 11:00 AM
Hi @NafizZainal
Kindly go with the code stage rather than looping the collections as it might take longer iteration time when the collections are fully loaded, as suggested above by @Neeraj Kumar and you can find the code by Emerson Ferreira in the above discussion.
Its a One liner code to be specific ( Collection_Out=Collection_In.DefaultView.ToTable(true) ) , follow this approach if you are facing any difficulties implementing above approaches:
Process :
Object : Add an Action in one of your existing collection manipulation extended objects or create a new object and check the required Dll and Namespaes in the Initialize page> code options:
Add an Action page and add input and output collection and write below code:
Collection_Out=Collection_In.DefaultView.ToTable(true)
------------------------------
Kindly up vote this as "Best Answer" if it adds value or resolves your query in anyway possible, happy to help.
Regards,
Mukesh Kumar - Senior Automation Developer
NHS England, United Kingdom, GB
------------------------------
Mukesh Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
20-03-23 01:44 AM
Hi Mukesh,
Is this going to work when I need to check only 2 columns with same value out of multiple columns? Here I attached the screenshot:
You can see I need to check for duplicate only for column 1 and column 3. What I need to do now is to remove Row 4 from Coll1 and add it into Coll2. Is the code stage possible for this scenario?
------------------------------
Nafiz Zainal
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-09-23 10:09 AM
Hi Will this work if the data is duplicates one is in upper case and other in lower case
------------------------------
Vikram Ramesh
------------------------------

- « Previous
-
- 1
- 2
- Next »