Home Search

DriveWorks Pro 21
Define Tables

Send Feedback

Define Tables

When creating an automation project, it is likely that you've got existing data in databases or spreadsheets that you want to reuse, you can create Tables using the Table Editor which can represent static data, or data which is pulled dynamically from external databases such as Microsoft SQL Server.


Tables

Table Types

DriveWorks allows the following types of table to be created

  • Rollup Data Table - Allows data from embedded child specifications to be passed directly to the table.
  • Simple Table - Creates a blank worksheet in which data can be typed or copied and pasted from compatible sources.
  • Excel data Table - Imports data from an Excel spreadsheet. Once imported the data can be edited directly in DriveWorks.
  • ODBC Data Table - Creates a link to a database that connects using ODBC. See How To: Setup a DSN-Access or How To: Setup a DSN-SQL Server for more information.
  • SQL Server Data Table - Creates a link directly to a SQL Server database. Once selected the wizard will guide you through connecting to all SQL Servers that are visible to the computer.
    The ODBC Data Table and SQL Server Data Table wizards include an option to refresh the data each time the project is opened. Beginning a new specification also opens the project and so the data is refreshed at this time also when this option is checked.

To Add a New Table

  1. Click the Add button on the command bar to launch the Create Table wizard.
  2. Select the Table type from the Template list.

  3. Enter a name for the table.
    Table names can be up to 245 characters in length.

    However we recommend keeping the length to a minimum.

  4. Select Finish (for Simple Table) to begin entering data.

    OR

  5. Select Next to enter additional set up information for the other table types.

Once the table has been created, the table editor will switch into Edit mode.

Table
Editor

In edit mode you can cut/copy/paste data from external systems, and fill in values in a similar way to a traditional spreadsheet.

When you are done, click the OK button to return to the table list.

To Edit a Table

To view or edit the data in an existing table, follow the steps below:

  1. From the Define Tables task, select the table to edit.
  2. Click the View/Edit button on the command bar.
  3. The table view will switch to edit mode.

Table
Editor

When editing a table the name is displayed in the Status Bar.

To edit additional set up information (for Excel, ODBC, SQL Server or Rollup data tables):

  1. From the Define Tables task, select the table to edit.
  2. Click the Configure button on the command bar.
  3. The Configure wizard will launch, allowing the additional set up information to be edited.

Multi-Selection

Multiple adjacent selections can be made by ether:

  • Shift Select
    1. Select the first cell in the selection range.
    2. Hold the shift key and select the last cell in the selection range.
  • Mouse Drag
    1. Select the first cell (left mouse button and hold), row or column in the selection range
    2. Drag the mouse to the last cell, row or column in the selection range and release.

Cut, Copy and Paste

Applies to Excel Data Table and Simple Tables (Group and Project) Only.

While in Edit mode data in the table can be cut, copied and pasted by:

  1. Select the cell, row or column with the data to be cut or copied.
  2. Select Cut or Copy:
    • from the command bar

      Or

    • from the right click context menu
  3. Select an empty cell, row or column to paste the data into.
  4. Select Paste:
    • from the command bar

      Or

    • from the right click context menu
Data can be cut, copied and pasted to and from other sources such as:
  • Spreadsheets
  • Text files

Insert

Applies to Excel Data Table and Simple Tables (Group and Project) Only.

While in Edit mode columns or rows can be inserted by:

  1. Select the cell, row or column from which a column or row is to be inserted.
  2. Right click and select Insert and either:
    • Row - will insert a single row immediately above the selection.
    • Rows - will present a pop-up window allowing the number of required rows to be entered.The number entered will be inserted immediately above the selection.
    • Column - will insert a single column immediately to the left of the selection.
    • Columns - will present a pop-up window allowing the number of required columns to be entered.The number entered will be inserted immediately to the left of the selection.

Delete

Applies to Excel Data Table and Simple Tables (Group and Project) Only.

While in Edit mode cell data, columns or rows can be deleted by:

  1. Select the cell, row or column to be deleted.
  2. Right click and select Delete and either:
    • Selected - will delete the selected cell data.
    • Rows - will delete the entire selected row. Subsequent rows will be moved up.
    • Columns - will delete the entire selected column. Subsequent columns will be moved to the left.

To Rename a Table

  1. Select the table to rename.
  2. Click the Rename button on the command bar.
  3. Enter the new name.
  4. Press Return to confirm the rename operation.

Renaming a table will scan all rules and replace any occurrence of the old name with the new name.

If DriveWorks detects that this could cause a delay, then the following message will be displayed.

Updating table names in rules is only supported when renaming project tables.

Renaming Group Tables, for example, will not scan every project in the group.

To Delete a Table

  1. Select the table to delete.
  2. Click the Delete button on the command bar.

Using Fractions

When fractions are required in a table, that are to be used in further calculations, include a column where the decimal equivalent of the fraction can be looked up and used in any calculation.

For example:

A Combo Box is required to be populated with a list of sizes using the fraction format. When a size is selected from the combo box, 2.5 is to be added to the value to obtain the overall length.

  1. Create a table with the sizes to be selected from the combo box in one column and the decimal equivalent in the next column
  2. Add a combo box to the user form and use the ListAll function to list all the values from the first column
  3. Create a variable to Lookup the selected size and report the decimal equivalent, and then add 2.5 to this value.

A method for storing tabular data.

The editor which is shown when a table is edited in the Define Tables task in the Project Designer.