Datatable columns using assign activity

I have created a data table using assign activity, now I would like to add columns to the data table using assign activity , how could we do that?

You can use the Build Data Table activity to add columns.

We have an issue with build data table, so we are checking with alternative options

You can use invoke code activity and use vb.net
Datatable.Columns.Add(“ColumnName”, System.Type.GetType(“System.Datatype”))

I. E. “Amount”, System.Type.GetType(“System.Decimal”)

3 Likes

Getting this error image
DT.Columns.Add(“Mail”, System.Type.GetType(“System.String”))

@SN2 Hello, On that same invoke code ,

Click edit arguments and simply create a data table argument with the name DT.

set the direction to in/out and bind the argument to the data table variable of your workflow

image

2 Likes