Add Data Row Error: This row already belongs to this table

I’m inside a for each and am adding rows from one table to another. The workflow successfully creates new records a few times and then gives me an error ‘System.Data - This row already belongs to this table.’ The error is thrown on the add data row activity.

Hi @bcarp

Can you attach a workflow?

This error occurs when you try to add a row in for each loop of same datatable and trying to adding row from it.

If you want to add data rows from one to another table you can use datatable.Select() or filter datatable activity

Thanks,
Prankur

1 Like