Objective

The objective of this How-To guide is to assist the users in creating and overwriting values in data tables and merging two tables into one in Openbots Studio. Most processes require utilization of data table to input data into it and attach it to the process requirement document.

Walkthrough

The following are the steps involved in overwriting and merging data tables in Openbots Studio. It is a procedure that involves click level operations from the data table command list.

Step 1: To create a new blank data table with required columns, select the create data table command from the list of commands under Data Table. User will define the instance name of the data table along with specifying the columns.

  • Select Create DataTable Command
  • Enter the alias name of the new data table (Table1)
  • Enter the column names as per requirement (ID, Name, Age, State)
  • Click OK

Step 2: After creating the structure of the data table, add data into it. Use the Add Data row command to fill in the data table with appropriate data. Repeat this process 4-5 times (user choice) to fill in considerable amount of data. User can also load data from any other existing data table.

  • Select Add DataRow Command
  • Enter the Data table instance name (Table1)
  • Input values for different columns in the data table in the prescribed order. (ID, Name, Age, State)
  • Click OK

Step 3: Create another Data table using the above two commands in similar manner with pre-defined data into it. Use similar columns names for understanding and easy merging. In other words, clone the structure of the table 1 and feed in different data.

Step 4: Create a blank word document and append the above created two data tables into it and append a text message mentioning them before appending the tables (Table 1 & Table 2). To learn about word document creation and functions, refer to Semi-Complex word guide to perform these tasks. Utilize create word, add document, append data table, append text commands to perform the task.

Step 5: To overwrite a row in the data table, extract or get the required data row into a variable using get data row command to index it while overwriting. The command is like Get cell command from the excel commands list.

  • Select Get DataRow Command
  • Enter the Table instance name (Table2)
  • Enter the data row index to extract (2, third row)
  • Enter the output variable name (row2)
  • Click OK

Step 6: After extracting the row into a variable, overwrite the value using the write data row value command. The row is indexed in the command using the variable and overwriting takes place in the original table, not just in the variable.

  • Select Write DataRow Value Command
  • Enter the row index variable (row2)
  • Select the search option to update the value (Column Name)
  • Enter the Column value to be update (Name)
  • Enter the new value for the column in the row (Sam)
  • Click OK

Step 7: Append the overwritten data table back to the word document with text stating “Modified Table 2”. Refer to Semi-Complex word guide for more information on word commands and functions. Use append data table, append text. The command will attach the text (Modified table 2) to the word file in a new line (Paragraph change) along with the updated data table.

Step 8: To merge the two tables; Table 1 and Modified Table 2, select the command merge data table from the list and input both the tables. The command merges the first table into the second or source table to destination. Table 1 is merged into table 2 here.

  • Select Merge DataTable Command
  • Enter Source data table instance (Table1)
  • Enter Destination data table instance (Table 2)
  • Select the missing schema for missing columns (Ignore)
  • Click OK

Step 9: Append the merged data table back to the word document with text stating “Merged Tables” and export the word document as PDF and close it Refer to Semi-Complex word guide for more information on word commands and functions. Use append data table, append text, export to PDF, close word. The new merged data table will be attached to the word file before saving it and converting to PDF. The word application is then closed.

Resulting PDF File with the data tables:

All the commands in this guide can be utilized alongside many of the other commands that will be discussed in later guides to perform several operations on Data Tables. Below is a snapshot of the process discussed in the guide.

Commands utilized for the above concept (Overwriting and Merging data tables) are as follows:

Data Table Commands: Create Data Table, Add Data Row, Get DataRow, Write DataRow value, Merge Data Table

Newsletter Bot

Lets stay in touch!

Join our weekly newsletter and follow us on social media.

Contact Sales
Call Our Experts!