Problem:
I am a beginner in UiPath and I want to join 2 datatables as shown in screenshot based on 2 matching columns, and then pick the columns that I need from table1 and table2 and save it to a IEnumerable variable matchedRows.
I then want to append the result(matchedRows) to an existing table 3 which has the same columns as table 1.
My approach:
I tried converting tables to Enumerables and then use join to accomplish this but I am getting errors like :
the type ‘ixmlserializable’ is defined in an assembly that is not referenced
What would be the best way to update datatable3 with new rows based on above criteria? Any alternatives or fixes to my current approach?
Easier way would be to use a join datatable activity first and then a filter datatable activity to get only columns you need from the joined table
Then use merge datatable to merge the joined data to table3 as needed..one thing you need to remember is after getting only columns you need the column names should match with table 3 to merge properly else you can rename the columns as you need and then merge
So 3 steps
Join dattable activity table 1 and 2
Filter datatable for joined table and get only columns you need
Merge datatable for appending joined datatable to table3
Is there a particular reason you want to keep the data as IEnumerable?
If you can use the data as a datatable itself, You can use “Join DataTable” activity to join table 1 and table 2, then use “Filter DataTable” activity to keep only particular columns.
Finally use “Merge Datatable” activity to add the result to table 3 or even “for each row” loop and the use “Add data row” activity to add the new rows.