15-07-21 12:20 PM
Answered! Go to Answer.
16-06-22 12:11 PM
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.
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
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
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
------------------------------
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
------------------------------
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