Is there any other activity other than Clear data table

Hi,

My clear datatable is not working ,is there is any other activity instead of clear datatable.

Hi @Chippy_Kolot ,

In an assign acitvity, dt = dt.clone

Regards,

1 Like

Hi @Chippy_Kolot ,

Use assign activity

YourDT = YourDT.Clone

Or
You can re initialize data table.

YourDT = New System.Data.DataTable()

Thanks!

Hi @Chippy_Kolot

You can use the Clone() function to remove all the data & retain the table structure like this:

You can see dt1_New had the data, but cloning and re-assigning cleared all the data.

Hope this helps,
Best Regards.

what is not working, what was implemented?

as an alternate:

dtData = dtData.Clone()

Hi @Chippy_Kolot

U can use many ways to Clear the Data in the Datatable

1) use assign activity
dt1=dt1.clone()

  1. Clear datatable activity
    image

Note: The activity must be out side of Foreach row in datatable activity

3) Invoke Method Activity

All things works well

Thanks
VP