Get Non Repeating Records from Collection (Review all Columns)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-02-23 03:58 PM
Hi!
I have this action where i have a collection like this:

And expect and ouptut like this:

This is my code stage:



How can I get it to review all columns to identify repeated records?
Up to now the Output is this:

Thanks in advance!
I have this action where i have a collection like this:
And expect and ouptut like this:
This is my code stage:
How can I get it to review all columns to identify repeated records?
Up to now the Output is this:
Thanks in advance!
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-02-23 10:57 AM
Hi Gabriela,
I'd suggest to make a new column in the same collection. In the new column you combine all data from the other columns, eg Elena48Red and Miguel28Orange. You will end up getting two rows with Ray58Blue. Then you proceed to remove any rows that are duplicates in the new column. When this is done, you can remove the new column. All of this can be done in BP without the need of a Code stage.
No doubt, someone else will shortly post the code to accomplish the same. 🙂
Happy Coding!
----------------
Paul
Sweden
I'd suggest to make a new column in the same collection. In the new column you combine all data from the other columns, eg Elena48Red and Miguel28Orange. You will end up getting two rows with Ray58Blue. Then you proceed to remove any rows that are duplicates in the new column. When this is done, you can remove the new column. All of this can be done in BP without the need of a Code stage.
No doubt, someone else will shortly post the code to accomplish the same. 🙂
Happy Coding!
----------------
Paul
Sweden
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)
Paul, Sweden
(By all means, do not mark this as the best answer!)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
08-02-23 06:30 AM
Hi @Gabriela Esquivel,
You can remove the Field Name input parameter and modify your code in the following way:
This way your grouping would be independent of any specific column and will take all column fields as grouping parameter.
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
You can remove the Field Name input parameter and modify your code in the following way:
Dim uniqueRows = (From row In Input_Collection.AsEnumerable()
Group row By a = String.Join(", ", row.ItemArray) Into grp = Group
Where grp.Count = 1
Select grp.First()).ToList()
Output_Collection = uniqueRows.CopyToDataTable()
This way your grouping would be independent of any specific column and will take all column fields as grouping parameter.
------------------------------
----------------------------------
Hope it helps you and if it resolves you query please mark it as the best answer so that others having the same problem can track the answer easily
Regards,
Devneet Mohanty
Intelligent Process Automation Consultant
Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com
----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.
