Create Table

This activity is used to create a table in a database.

Technical Reference

 

 

 

 

INPUT

DatabaseLocation: Specify the location where the database is stored.

DatabaseName: Name of the database in which the table has to be created.

Script: Autofills once the script is generated using the design table.

TableName: Autofills once the script is generated using the design table.

 

 

 

 

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 Portable database feature in use.

 

 

OUTPUT

Created Script: This is not a mandatory field. However, if you wish to see the script declare a variable here to see the same in the output box.

Result: Define a Boolean value to validate the success state of the activity.

*Mandatory fields to execute the workflow

Use Case

The following activity illustrates on how we can use the create table activity to create
a table in the database created. To see how to create a database, click here.

Steps to execute a bot

1.      Drag and drop a create table activity to the workflow.

2.      Double click on the activity.

3.      Click on design table and a box opens like the one shown below.

4.    Click on browse to choose the folder location where the database is saved.

5.     From the dropdown select the created database into which the table must be
created.

6.    Give a name to the table.

7.     Fill in the required fields for the database with the field name, data type and
choose if it’s a primary key.

8.    The table name and field name should not contain any special characters.

9.    Once done click on generate script, and the details gets auto filled in the create table
property box.

10.  Enter a variable to the created script box of the output segment. Here it is CS.

11.  Drag and drop a write log activity below the create table activity.

12.  Enter the same variable declared above.

13.  Enter the log level as “info”.

The bot executes the activity, creates the table, and gives the generated script in the

output box.