Convert DataTable to one line Array/DataRow and append at the 5th column of another DataTable

How do I convert datatable A to a one line array or datarow and append it at the fifth column of datatable B.

can you share some sample data illustrating your case? Thanks

Hi @arina ,

We would need to understand the clear requirement.

Do you want to append all the data from Datatable A to Datatable B ? (Join Datatables)

Also, Maybe take a look at the Merge Datatable Activity as it may be related to what is needed.

Could you provide us with the Sample Inputs/Outputs for this task.

Since a DataTable usually has multiple rows, it’s a bit weird to fit everything into a single row…

In any case, it seems you’re trying to iterate the rows of ExtractDataTable3 and, using the Add Data Row activity, add each row to another DataTable using datatable.select().
There are two problems with that:

  1. datatable.select() will give you an array of DataRow, but you already have it from using the For Each Row activity.
  2. Even if you pass just row to the Add Data Row activity, it’ll give you an error, because that row belongs to another table (ExtractDataTable3).

One possible solution is to pass row.ItemArray to the ArrayRow property of the Add Data Row activity:
TransferingRows.zip (2.6 KB)

Input
image

Output (Append to another table starts from the fifth column)

Column E, F, G, H, I can be up to 15.

Input:
image

Output (Append to another table starts from the fifth column):

Column E, F, G, H, I can be up to 15.

Hi @arina ,

Could you Check the below Workflow :
DT_AppendAllValues_SingleRow.zip (9.8 KB)

The above workflow is provided such that it is assumed always there is only one row in Datatable B. We could change this and make it dynamic but we would need more details on the dynamic part.

There are Descriptions in the Activity names that should help in understanding the Logic used.

Let us know if you need a Modification and what exactly is the change required.

Hi @arina,
Please check this one.
Main (8).xaml (9.6 KB)
Thanks,
Raja Muhammad Arslan