How to remove datatable1 form datatable2 (datatable2 contains datatable1)

Hi, I have a question about deleting datatable1 form datatable2, I run the test in the below, but I got this error. How can I solve this, thank you.

`Remove Data Row: The given DataRow is not in the current DataRowCollection.`

image

image

give a try on
Assign activity:
left side: drResult | Datatype: List(of DataRows)
right side: datatable2.Except(datatable1, DataRowComparer.Default).toList

If activity: Condition: drResult.Count > 0
then: dtFiltered = drResult.CopyToDataTable
else: dtFiltered = datatable2.CopyToDataTable

dtFiltered is of datatype: DataTable

2 Likes