How to Merge Different Types of Datatable

datatable
activities

#1

Hello, I want to append new data to an existing history data, but the datas(in DataTable) have different Column Name, and so I decided to use Invoke Method Merge, but it threw this error:

And then I see from this StackOverflow article it seems there is some property to ignore the different types in VB.net, like this:

table1.Merge(TempTable, True, MissingSchemaAction.Ignore)

Any advice how to implement this in UiPath?

Attached is my Merge DataTables.xaml (6.0 KB)
.


#2

Hello there,
Any specific reason to use Invoke code?
Studio offers inbuilt “Merge data table” activity with schema option.

mergeTable


#3

Because I didn’t know there was this Merge DataTable activity… (O.o)
Thanks a lot, it works well now!