Hello,
Instead of using assign activity, can you please try to use add datarow activity to add the data to second datatable and see if it’s working? Here, 2nd row is not present and you are trying to add a value there. To double check, you can get the no of rows in 2nd datatable using : datatable2.rows.count.tostring
Thanks,
Athira