Datatable - Grouping Data on 3 Columns - Split on different Data Tables

Hello,

I have a datatable composed of 4 columns, as in the image:

image

I need to group the rows that have the same “Number” AND “Name” and “Code” column values as follows:

image

The result in the example should return me 8 datatables.

Any idea to achieve this?

Thanks!

https://www.google.com/search?q=uipath+group+datatable+site:forum.uipath.com&safe=active&rlz=1C1GCEA_enUS956US956&sa=X&ved=2ahUKEwj3h-ezlrn2AhVOZN8KHVcXASIQrQIoBHoECBAQBQ&biw=1920&bih=937&dpr=1

Hi

Have a view on this thread for some idea

Cheers @andreus91

Hi @andreus91

Have a look on the thread

Regards
Gokul

assign Activity
LHS: TableList | List(of DataTable)
RHS

(From d in YourDataTableVar.AsEnumerable
Group d by k1=d("Name").toString, k2=d("Number").toString, k3=d("Code").toString into grp=Group
Select t=grp.CopyToDataTAble).toList

Also Have a look here:

2 Likes

Thanks to all, i’m signing your solution as the correct one!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.