Use datatable select get datarow, however, when I add data column per array, system exception

I use datatable select get datarow, I want to add result into datarow, however, when I add data column per array, system exception


Can you check if you set DB_SumAPInvNew (not butDB_SumAPInvNewResult) at DataTable property?

And as DR_temp is DataRow array, we need to set index for it because AddDataRow can add only 1 datarow.


HI @Lori

Can you check if the Data Table is initialized. May be DataTable is null.

Check out this thread XAML file for reference

This video link is for reference how this issue occur and solving


Hi @Lori

You have to give a structure to db_SumAPInvNewResult so please use assign like this before for loop

Db_SumAPInvNewResult = Db_SumAPInVNew.clone()


@Yoichi @Gokul001 @Anil_G

Thanks, I had initialized. get another error.


For now, can you try the following expression at ArrayRow property?


If you need to add all items of DR_temp, we need to add ForEach activity and add all the item.


Yes, It works and only can add one row into datatable, how to get current row index? thanks.


If need to add all the datarow, can you try either of the following?

Use ForEach

Use MergeDataTable



I use for each and it works well, thanks for your great help!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.