Data Table New column with Default value

Hi,

I have a data table called DT. I need to add a new column “MyNewCol” in my data table with default value of “ABC” in all rows of this column.

When I use add data column activity it is creating too many unwanted rows.

I am using assign activity that works fine for me except I am not able to set default value in this new data column

DT.Columns.Add(“MyNewCol”, GetType(String),) ?

@ankur7185,

Are you getting any error ?
Could you please share your work and will check and update you.

Hi @ankur7185,

Try the sample workflow - Main.xaml (8.1 KB) - It is working for me.

You need to set default value -

1 Like

Thanks Lakshman - I am able to do the same using the same steps suggested by Avi7, i was doing something wrong resulting in extra rows.
thanks everyone.

1 Like

Thanks. I am able to do the same using the same steps suggested by you , i was doing something wrong resulting in extra rows.

1 Like

@ankur7185,

Is the issue fixed now ?

Yes, this is done

1 Like

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