Setting Up a Background Lookup Using a Connect Command

Previous  Home topic  Next  Print this topic Send Feedback

A background lookup requests data from a database or LDAP connection and automatically retrieves data from a specified datasource without any interaction expected from the user. A common use for this type of lookup is the loading of list or drop-down options taken from a system database. Also, data can be passed from a form to a database connection to act as a filter which is expected to return a single record of data to populate specific form fields.

 

The following steps apply to an example form with a Search button and three fields: Order Number, Order Date and Customer ID. The expected behavior is that the user must enter a valid order number and then click Search to retrieve order details and fill the other form fields.

 

Document Icon

1.Select the Search button object on the form.
2.On the Properties bar, select the Button Is Pressed behavior. The system switches to Behavior view.
3.In the Integration Commands section of the Toolbox, select the Connect command and drag it onto the Behaviors canvas.
4.In the Properties bar, select a connection from the Connections list.
5.Now select an Action belonging to that connection from the lower list. For more information, see Defining Connection Actions.
6.The Send Parameters will then list all fields that the form can send to the action (in this case the action is a lookup).
7.Find the datasource field in the Name column which holds the order number (OrderID in the example). Click in the Source column and find the Order Number field within the form. This will now pass the order number through to a SQL statement with the Order Number automatically inserted into the WHERE clause.
8.Now specify the Return Parameters. Find the datasource fields in the Name column from which the data is being returned. Click in the Target column and find the form fields that should receive the returned data (CustomerID and OrderDate in the example below). If you do not need to populate a specific field, just leave it empty.

Connect Properties

9.Select Preview from the Form menu to test the lookup.

Updated: 06/12/2011  Page url: http://www.perfectforms.com/Documentation/manual/html/?a_background_lookup.htm
PerfectForms™ -- forms software, workflow software, and business process management