TrinadhB
(Boda Trinadh)
August 26, 2022, 8:24am
1
LINQ query to separate rows based on duplicated Column value into other datatable.
As in screenshot, its MainDt. After seperating Dt1 should have row3 and Dt2 should have row2&4
J0ska
August 26, 2022, 8:33am
2
There are many forum posts about LINQ
Follow this pls
Please also have a look at our updated Forum FAQ here
Without further ado:
Before you ask…
Community forum is not a helpdesk
Let’s put this in the front - vast majority of people here do not work for UiPath. We’re volunteering our free time to help others and as much as it pains to say it, not all topics might get a satisfying answer.
If you’re an enterprise customer and need an answer from UiPath support, send them a ticket through the form or via their helpdesk portal.
Did you search?
C…
Or use “Filter Data Table” activity - it was created to ease life of “citizen programmers”
Cheers
Hi @TrinadhB ,
It seems to be a Group By Case on the Description column. Do you want to Identify the Duplicates based on the Description Column ?
We can suggest you the solution approach if you could provide us more accurate details on the requirement.
TrinadhB
(Boda Trinadh)
August 26, 2022, 8:37am
4
Identify any duplicate in description column and then separate those rows
TrinadhB
(Boda Trinadh)
August 26, 2022, 8:38am
5
hi @supermanPunch
Yes, based on Description column
ppr
(Peter Preuss)
August 26, 2022, 8:43am
6
This HowTo introduces on the different options for grouping data from a datatable in order to process the grouped data.
Introduction
Grouping data and processing the grouped data is a common scenario e.g. when the grouped data is to aggregate like summing up, find maximum, get the average or concatening items.
Lets have a look on following data:
[grafik]
A possible scenario could be:
Create a report containing following information:
the region code
the sum of CaseCount per RegionCode
t…
Lets assume to split into different datatables:
Assign Activity:
TableList | List (Of DataTable) =
(From d in YourDTVar.AsEnumerable()
Group d by k=d("Description").toString.ToUpper.Trim into grp = Group
Select t = grp.CopyToDataTable).ToList
system
(system)
Closed
August 29, 2022, 3:47pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.