<img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=287945&amp;fmt=gif">

Using Workflow Form to Retrieve Data From External Sources

Posted by Dileepa WIjayanayake on Mar 11, 2015 7:25:27 PM


When entering data into a cDevWorkflow form instance, values can be looked up in real-time from other systems using database connections or web-service connections. In order to configure lookups, you must first define your connections to retrieve data. From the cDevWorkflow Configuration Manager, let’s navigate to Status –> Connections page: Retrieve Data Configuration Manager

The Database and Web-Service Connections page will render as follows: Retrieve Data Create

Click the “Create” button to create a new connection. The Create Connection dialog renders as follows: Retrieve Data Create Connetion

Enter a name for the new connection, a type, and a connection string. If you are trying this on the http://demo.cdevworkflow.com website you can select the type of “MS SQL Server – OLEDB” and enter a connection string of “Provider=SQLOLEDB.1;Password=testdata;Persist Security Info=True;User ID=testdata;Initial Catalog=TestData;Data Source=kansas.innovativeglobal.com”.

You can click the “Test” button to test the connection string before creating the connection. Click the “Create Connection” button to create the connection. Retrieve Data Create Connetion Test

Once the connection is created, it will render as follows: Retrieve Data Create Connection Test Render

Next let’s navigate to the Form definitions and open the “TestFormFile” (from our previous blog) within the form designer. Drag and drop a Lookup Control to the designer:

Retrieve Data Lookup

Double click on the “Lookup” button to configure its properties: Retrieve Data Lookup Setup

Set the Data Connection Type to “Database” and select the “TestData” connection we defined in the previous step. In the “Select Query” box, enter a SQL query text to return the desired data from the connection. In the example above, lastName and firstName are columns in the dataLookup table in the TestData database on kansas.innovativeglobal.com.

Scroll down on the dialog and map the database fields to the form fields.

Retrieve Data Setup Lookup

Now let’s save the control properties, save the form and navigate to the Form Instances tab. Select the “TestFormFile” Form Instance created in the last blog (or create a new instance of your form definition) and click the “Edit” button to edit the form instance data. The Form Instance should render as follows: Retrieve Data Form Instance

Click the “Name Lookup” button for the lookup dialog: Retrieve Data Name Lookup

Select a row from the lookup dialog and click the “OK” button. Based on the selected row, the value of “Jones” is entered in the “Last Name” field and the value of “Tom” is entered in the “First Name” field. Click the “Submit” button to save the data entered. Retrieve Data Submit

Use the same retrieve data concept to perform a lookup based on a web-service connection.


You may also be interested in reading more on the subject of Configuring a Custom Workflow Step.

A small sampling of the Workflow Technology for BPM Solutions contained within our cDevWorkflow product offering can be found here: Workflow Technology That Works.

[hs_form id="9"]

Learn more about our Process Automation & IT, QA Services or Software Development products and solutions on the Web!  Visit us at: Innovative Process Solutions

Topics: Blog, forms workflow, .net forms workflow software, dynamic form, workflow forms, .net workflow software forms, forms .net workflow software, dynamic forms, form workflow, workflow form instances, retrieve data, information retrieval