Manage DataTables
The example below explains how to create and print a data table, look up the specified value, clear and print the data table by using activities such as Build Data Table, Output Data Table, Clear Data Table, and Lookup Data Table. You can find these activities in the package.
This is how the automation process can be built:
-
Open Studio and create a new Process.
-
Drag a Sequence container in the Workflow Designer.
-
Create the following variables:
Variable Name Variable Type Default Value DT1DataTable NameGenericValue DataTableStringString
-
-
Drag a Build Data Table activity inside the Sequence container.
- In the Properties panel, add the variable
DT1in the DataTable field.
- In the Properties panel, add the variable
-
Click the DataTable button from the Build Data Table activity.
- Click the Add Column button and add a new column.
- Click the Edit Column button from the first column and add the value
Namein the ColumnName field. - Select the String option from the Data Type drop-down list.
- Select the check box for the Allow Null option.
- Add the value
-1in the Max Length field. - Click the OK option for closing the window.
- Click the Edit Column button from the second column and add the value
Surnamein the ColumnName field. - Select the String option from the Data Type drop-down list.
- Select the check box for the Allow Null option.
- Add the value
-1in the Max Length field. - Click the OK option for closing the window.
- Click the Edit Column button from the third column and add the value
Gradein the ColumnName field. - Select the Int32 option from the Data Type drop-down list.
- Select the check box for the Allow Null option.
- Add the value
-1in the Max Length field. - Click the OK button for closing the window.
- Click the OK button again.
- This is how the DataTable window should look:

-
Drag an Output Data Table activity below the Build Data Table activity.
- In the Properties panel, add the variable
DT1in the DataTable field. - Add the variable
DataTableStringin the Text field.
- In the Properties panel, add the variable
-
Place a Write Line activity below the Output Data Table activity.
- Add the variable
DataTableStringin the Text field.
- Add the variable
-
Drag a Lookup Data Table activity below the Write Line activity.
- In the Properties panel, add the variable
DT1in the DataTable field. - Add the value
"10"in the LookupValue field. - Add the value
"Grade"in the ColumnName field. - Add the value
Namein the CellValue field. - Add the value
Namein the ColumnName field.
- In the Properties panel, add the variable
-
Place a Write Line activity below the Output Data Table activity.
- Add the variable
Namein the Text field.
- Add the variable
-
Drag a Clear Data Table activity underneath the Write Line activity.
- In the Properties panel, add the variable
DT1in the DataTable field.
- In the Properties panel, add the variable
-
Drag an Output Data Table activity below the Clear Data Table activity.
- In the Properties panel, add the variable
DT1in the DataTable field. - Add the variable
DataTableStringin the Text field.
- In the Properties panel, add the variable
-
Drag a Lookup Data Table activity below the Output Data Table activity.
- In the Properties panel, add the variable
DT1in the DataTable field. - Add the value
"10"in the LookupValue field. - Add the value
"Grade"in the ColumnName field. - Add the value
Namein the CellValue field. - Add the value
Namein the ColumnName field.
- In the Properties panel, add the variable
-
Place a Write Line activity below the Lookup Data Table activity.
- Add the variable
DataTableStringin the Text field.
- Add the variable
-
Place a Write Line activity below the previous Write Line activity.
- Add the variable
Namein the Text field.
- Add the variable
-
Run the process. The robot creates and prints the data table, looks up the specified value, clears and prints the data table.
This is how your workflow should look:

Here you can download an example.