Hi,
i have a Dt, i wanted to create a new column with default value as “N/A”. I used add data column activity but it is adding column at the end of datatable. i wanted to add new column as the first column. How to achieve this?
Hi,
i have a Dt, i wanted to create a new column with default value as “N/A”. I used add data column activity but it is adding column at the end of datatable. i wanted to add new column as the first column. How to achieve this?
This should help:
Hi @Sirisha_Siri ,
Placing the Column at a Particular Position, we use Invoke Method on Datatable Column’s Set Ordinal Method like below :

0 indicates the First Position.
or
If we do know the Column Names, we can use Filter Datatable activity and Mention the Column Names in the Order Required, the Output Datatable will have the Datatable Columns in the Order Mentioned :

Similarly using DefaultView.ToTable() we can achieve the same functionality.
DT = DT.DefaultView.ToTable(false,"New Column Name","Other Column Name1","Other Column Name2")