Hello
Is this a bug?
I have two datatables and I want to clear datatable 2 inside an “for each row in datatable” of datatable 1.
UiPath Studio seems to ignore the value of “datatable to be cleared” and clears both datatables.
Regards
Soren
Hello
Is this a bug?
I have two datatables and I want to clear datatable 2 inside an “for each row in datatable” of datatable 1.
UiPath Studio seems to ignore the value of “datatable to be cleared” and clears both datatables.
Regards
Soren
What are you trying to do? There’s no reason to clear a datatable over and over like that. Aside from the strangeness of the error, what you’re doing makes no sense. What’s your goal?
Datatables are objects. So when you assign Datatable2 = Datatable1, you are just telling both the variables to point to the same object/datatable. To get two different datatables, use Copy() instead.
Datatable2 = Datatable1.Copy()
HI @SorenB
This error is occurring because you are looping through a datatable and clearing the same datatable
Why are trying to do this any specific reason ?
This is the thing happened there
Regards
Sudharsan
@SorenB
Because of you assigning the Datatable 2 = Datatable1
Both the datatable will be get cleared
Regards
Sudharsan
Hello everyone
Thank you for your responses.
The shown image was just to demonstrate the error.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.