Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-03-20 12:06 PM
Hello,
I have action which remove duplicated rows in whole collection.
Collection_Out = Collection_In.DefaultView.ToTable(True)
I want to write new action which remove duplicates value only in specific column.
Does anyone have solution for this?
Thank you in advance
------------------------------
Mateusz Wojcik
RPA Programist
Rockwell Automation
Europe/Warsaw
------------------------------
I have action which remove duplicated rows in whole collection.
Collection_Out = Collection_In.DefaultView.ToTable(True)
I want to write new action which remove duplicates value only in specific column.
Does anyone have solution for this?
Thank you in advance
------------------------------
Mateusz Wojcik
RPA Programist
Rockwell Automation
Europe/Warsaw
------------------------------
Answered! Go to Answer.
12 REPLIES 12
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-07-20 11:25 AM
i have try your code but i got error, can you help me
------------------------------
IAN NUGI
------------------------------
------------------------------
IAN NUGI
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
02-07-20 01:48 PM
Hi IAN NUGI,
I send word document where you can find whole page from object.
Please paste it in your object Utility - Collection manipulation.
Please let me know if it works
Kind regards
------------------------------
Mateusz Wojcik
RPA Programist
Rockwell Automation
Europe/Warsaw
------------------------------
I send word document where you can find whole page from object.
Please paste it in your object Utility - Collection manipulation.
Please let me know if it works
Kind regards
------------------------------
Mateusz Wojcik
RPA Programist
Rockwell Automation
Europe/Warsaw
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
03-07-20 07:42 AM
Hi,
I can share my code regarding removing duplicates:
Create a code stage.
input:
<type collection> Input name: CollectionIn
output:
<type collection> output name: CollectionOut
<type text> ErrorMessage
------------------------------
MIROSLAW GADEK
CI & QUALITY MANAGER DACH
Schneider Electric Operations Consulting GmbH
Europe/Berlin
------------------------------
I can share my code regarding removing duplicates:
Create a code stage.
input:
<type collection> Input name: CollectionIn
output:
<type collection> output name: CollectionOut
<type text> ErrorMessage
ErrorMessage = ""; CollectionOut = new DataTable(); DataTable dt1 = new DataTable(); try { dt1 = CollectionIn; DataTable dtMerged = dt1.AsEnumerable() .GroupBy(r => new {d= r.Field<string>("put here column name from your collection") }) .Select(g => g.First()).CopyToDataTable(); CollectionOut = dtMerged; } catch (Exception ex) { ErrorMessage = ex.Message.ToString(); }
Namespace Imports:
System.Linq
System.Reflection
System.Collections.Generic
External References:
System.Linq.dll
System.Data.Common.dll
System.Core.dll
System.Data.DataSetExtensions.dll
Hope this will help:)
------------------------------
MIROSLAW GADEK
CI & QUALITY MANAGER DACH
Schneider Electric Operations Consulting GmbH
Europe/Berlin
------------------------------

- « Previous
-
- 1
- 2
- Next »