Hi again @Rakesh_Tiwari,
Guess what happened! I had the same failure message almost exactly at the same time you posted the failure message.
I myself did not understand at first why this happens because in a For Each Row we always have row or item in DataRow argument type so when adding the row to different datatable, it should just take row as argument. But it is not the case.
So here is the simpler solution thanks to @ppr Adding data row to data table. this row already belongs to another table - Build / Studio - UiPath Community Forum)
Try this
Remove value row
from DataRow
property and instead use value row.ItemArray
in the RowArray
property of Add Data Row
activity
Note: Here row
can be the name you give so it can be anything depending on how you use the For Each Row
activity
What you are essentially saying is "Hey activity get all the row values of the matched row (on Dept. No and Manager) convert it to array and use that array to populate the row in the new data table "