Add new column

This activity is used to add a new column to the existing table during the runtime.

Technical Reference:

 

 

 

 

 

 

INPUT

DataTable: Specify the input data table where you want to add new row

DataType: Select the data type of the column from the drop-down. The types are, Int, String, DataTime, Double. Select the type that you want for that column.

DefaultValue: Specify the default value that needs to be filled automatically in the fields. The value will be same for all rows corresponding to the column.

Name: Specify the name of the column that you want to name it.

Position: Specify the position of the column within the double quotes.

 

 

 

 

 

 

MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the DataTable automation feature in use.

OUTPUT

Result: Declare and assign a variable to return the success rate of Skip on error functionality. This is not a mandatory field however declare a variable to get the result.

* Mandatory fields to execute the workflow

 

The following activity illustrates on how we are going to add a new column to the specified table. The column that we are going to add is to the table which has been created already using generate table activity.

Example:

The following explains how to add a new column to the table.

1.    Drag and drop the Add new column activity to the workflow.

2.    Connect it below to the Generate table activity.

3.    Enter the table variable in the Datatable from the properties panel.

4.    You select the data type from the drop down. Select string.

5.    Enter the default value as “YES” in the box.

6.    Enter the name as “Are they available currently?”  in the box as column heading.

7.    Enter the position of the column as “Sample.Columns.Count” in the box.

8.    Add table viewer activity below the Add new column activity.

9.    Enter the datatable variable and title to the table.

10.  Now, execute the workflow.

The bot will execute the workflow and add new column to the table with default value to the table.