Suppose I have a data table with 5 columns (3 string,2 int32)
I want to get another data table with same headers and same data types
Can I get it Using Build Data Table
2 Likes
Hey @Sravya
DataTable.Clone Method():
Clones the structure of the DataTable, including all DataTable schemas and constraints.
Reference: DataTable.Clone Method (System.Data) | Microsoft Learn
Nop just crete a new variable of datatable type then use Assign activity like below ![]()
DataTable newTable = originalTable.Clone()
Regards…!!
Aksh
17 Likes
Thank You.I will try.
Hi Aksh,
Suppose i want to copy all the data from one table to a new table, can below expression in Assign activity will do the work? Thanks!
DT.Select().CopyToDataTable.
1 Like
You can use the Copy() method along with the Ui Path Assignment activity, i.e.
newDataTable = oldDataTable.Copy()
3 Likes