Add Datatable column data in run time

Hi,

I am iterating a datatable using for each row and doing some validation for each row. Now I want to add my validated data for each row in new data table so that I can write this to an excel file.

Like:

so if there are 5 columns I want for each row in my datatable to add value to all 5 columns:
For Row1:
DataTable.(“ColumnName1”) = A
DataTable.(“ColumnName1”) = B
DataTable.(“ColumnName1”) = C

Please suggest.

HI @p4uk80

I have a sample workflow which I can share with you. So in your For Each Row loop in the screenshot, it looks like you have some variables which you assign values through the assign activities. And you want these variables to be added as a new row to your new Datatable right?

SO my sample here suits your requirement. I have added some comments for you to go through so that it will be easy to understand. You can change it accordingly to get your problem sorted…

AddFromOneTableToAnother.xaml (9.6 KB)

Let know whether this works for you…

If it works, please make sure to mark the answer as the solution too… :slight_smile:

1 Like