Home Search

DriveWorks Pro 22
Info: Using External Data In DriveWorks (KB12121014)

Send Feedback

Info: Using External Data In DriveWorks

Every business is under pressure to work more efficiently and effectively and there are numerous software solutions available to help across all aspects of an organizations activities.

These span all disciplines and include but are not limited to Accounting and Finance, Enterprise Resource Planning (ERP), Material Requirements Planning (MRP), Customer relationship management (CRM) and of course DriveWorks for Design Automation and Configuration.

Since different solutions provide and require data in different formats through different methods, DriveWorks Pro has many different options of pulling and pushing data to 3rd party systems.

This topic discusses the following available options:

  • File Import/Export
  • Tabular Data Import and Export
  • Function Based Data Queries
  • Data Connectors
  • DriveWorks Application Programming Interface (API)

The specific methods that you use will depend on your 3rd party system, data availability and performance requirements.

Once this data is in DriveWorks, various functions will assist you to make use of the data in rules or user form controls (for instance TableSort, TableGetValue, TableMax, TableDistinct, ListAllConditional, VLookup).

These functions can further process the tabular data, create lists based on columns in the table or look up information in the table based on other selections you have made in DriveWorks.

File Import/Export

DriveWorks Pro can read and write from a variety of file formats, including but not limited to text files, xml files and Microsoft Excel documents.

Importing is generally done either by copying and pasting the file contents into DriveWorks (Either into a table or a text box on a form) or by running a function or task to import the data during the specification process.

Files can also be uploaded in a DriveWorks Form by a user for further processing.

Tabular Data Import and Export

DriveWorks Pro has inbuilt features to pull tabular data directly from any table or view in Microsoft SQL Server or any ODBC data source (ODBC is a standard data communication method and is supported by all modern databases)

This is generally a snapshot of data that can be updated at any time of your choosing. Alternatively a new snapshot can be taken every time someone fills out a form in DriveWorks.

DriveWorks Pro also has the ability to write back to those database tables (assuming you have the correct permissions) to either insert, update or delete rows in the table.

Care must be taken when writing back to a database table that you do not bypass the business logic of the 3rd party system.

More information on importing tabular data can be found here: ProjectEditorTables

More information on exporting tabular data can be found here: Exporting to SQL Server and here: Exporting via ODBC

Function Based Data Queries

DriveWorks Pro has inbuilt functions that allow you to easily query data in a database table of view. The benefit of using functions over data import is that you can change the data query based on rules, and therefore based on the data being entered in the form. An example of this would be to retrieve the address of a customer selected in a form.

The functions will re-query the database each time one of their arguments change and generally retrieve much less data on each query and so perform better than getting all of the data from a table into DriveWorks.

Examples of Function Queries are QueryData and QueryDataValues

Functions such as DBExecute can also be used to run SQL commands to update data in a database.

Data Connectors

DriveWorks Pro Autopilot, one of the modules of DriveWorks Pro, has a number of inbuilt connectors allowing you to create specifications (fill out the forms automatically) from your 3rd party system.

These include:

  • Database Connector
  • The database connector will monitor a database for additions and updates. If new data is found, the table row will be passed into DriveWorks Autopilot as a new specification.

  • Web Service Connector
  • The web service connector turns DriveWorks Autopilot into a web service allowing you to communicate with it programmatically from your 3rd party system to automatically create new specifications.

  • Folder Watcher Connector
  • The folder watcher connector will watch a folder for new files. If a new file (for example a text file or xml file) is placed in that folder by a 3rd party system (or manually) then DriveWorks Autopilot will use the data in the file to create a new specification.

DriveWorks Application Programming Interface (API)

If none of the inbuilt features of DriveWorks Pro work in your situation, then the DriveWorks API has all of the hooks and events needed for you to programmatically communicate with your 3rd party system.

An example of this would be for pulling a customer list into DriveWorks from a hosted system (for instance salesforce.com) where access to the database directly is prohibited, or where the external application has its own API for filtering and sorting data.

The API is delivered in the form of a Software Development Kit that includes full documentation and the necessary references.

For information on the DriveWorks SDK see How To: Obtain The DriveWorks SDK

We have also published a number of open source code examples that can be viewed and downloaded from our github repository

Using the SDK you can create custom tasks, conditions and functions as well as create plugins to DriveWorks that can hook into all of the events raised during specification and document generation.


Knowledge Base Article Ref:KB12121014