Append datatable with other datatable

Hi all,

I have two datatables.
The first one has the following columns: Address, Activity, Sector, Requestor, Validator
The second one has the following columns: ID, request, date

The data in datatable 2, column “request” has to be appended (added as a new row) in datatable 1 in column “sector”.

How do I do this?

Your help is much appreciated.

Are all the other columns in the first datatable (besides “sector”) to be left blank? Should anything happen with the “ID” and “Date” data from the second datatable? You can use a “for each row” activity to loop through the second data table adding the data to the first datatable with the “Add data row” activity. Your DataTable for the input property of the Add data row activity would be the first data table and the ArrayRow input would look something like below (unless you needed other data besides the “request” value populated in the row).

{"","",row("request").ToString,"",""}

Edit: Depending on the values of the columns in the first datatable you may need to replace the empty strings with other placeholder values.

Yes, the other columns can be left blank for the rows that are going to be added and nothing should happen with the ID and Date.

Thanks for the code, I will try it later on and provide you with an update.