LINQ Join using Invoke Code

Hi, it may be an overkill but was trying to write a LINQ that will join 3 DataTables within Invoke Code activity. Can someone guide me in the areas marked as “help here” so that the result of LINQ is stored in vbResultDataTable and returned to workflow.

I am struggling to capture and process the List of “anonymous type”.

vbResultDataTable = New Datatable()

With vbResultDataTable
.Columns.Add(“ID”,GetType(String))
.Columns.Add(“Account”,GetType(String))
.Columns.Add(“Description”,GetType(String))
End With

Dim vbResultRows As help here =
(From File1 In vbFile1.AsEnumerable()
Join File2 In vbFile2.AsEnumerable()
On File1.Field(Of String) (“ID”) Equals File2.Field(Of String) (“ID”)
Join File3 In vbFile3.AsEnumerable()
On File1.Field(Of String) (“ID”) Equals File3.Field(Of String) (“ID”)
Select New With {
.ID = File1.Field(Of String)(“ID”),
.Account = File1.Field(Of String)(“Account”),
.Description = File1.Field(Of String)(“Description”)}).ToList()

Dim obj As Help Here

For Each obj In vbResultRows
Dim dr As DataRow = vbResultDataTable.NewRow()
dr(“ID”) = obj.Item(“ID”) help here
dr(“Account”) = obj.Item(“Account”) help here
dr(“Description”) = obj.Item(“Description”) help here
Next

Hi @Udayan

Check this

https://aws1.discourse-cdn.com/uipath/original/2X/1/16a3756c2d8d6ffb683fdac6231c31f7c4503a3d.xaml

Thanks
Ashwin.S