UiPath.Core.Activities.ClearDataTable clearing all DataTables

Hi,

I have 3 different DataTables with the same data and I want to clear 1 of them by using the UiPath.Core.Activities.ClearDataTable. However, this activity is clearing all my three Data Tables.
Is anyone aware of this bug?

Thanks

@juan.porras1,

It’s due to copying logic you have used.

Copying datatable like the below will be copying the reference of original datatable to the copy datatable.

dt2=dt1

Avoid this and make sure you are copying the datatable like this

dt2=dt1.Copy
dt3=dt1.Copy

Ah you’re right.
Didn’t know about the reference.

Thank you.

1 Like

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