How to Join Datatable via Code

Hi,

I know that there is an existing join activity, but in a situation where i want to perform a datatable join via code (linq) in UiPath how do i do this given that Uipath disallows Anonymous typing by default?

1 Like

@mayuyu

Refer This,

Thanks,
Suresh J

2 Likes

Hi,

you can use below code

tempDt = (From x In dt1 Join y In dt2 On x(“id”).toString Equals y(“pkgId”).toString
Select tempDt.LoadDataRow(New Object(){x(“id”).toString,x(“name”).toString,y(“Location”).toString,y(“Country”).toString},False)).CopyToDatatable

5 Likes

Big thanks to you guys!

2 Likes

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