A background lookup requests data from a database or LDAP connection and automatically retrieves it from the specified data source with no interaction expected from the user. A common use for this type of lookup is loading list or drop-down options from a system database. Also, data can be passed from an app to a database connection to act as a filter, which is expected to return a single record of data to populate specific app fields.
The following steps apply to an example app 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, then click Search to retrieve order details and fill in the other app fields.
|
1.Select the Search button object on the app. 2.On the Properties panel, 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 panel, 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 app can send to the action (in this case, the action is a lookup). 7.Find the data source parameter in the Send Parameter Name column that you will use to search for a specific data record. (ID in the example). Click the Source column and find the field in the app that contains the data to be used. In this example, the customer ID will now be passed to a SQL statement with that ID automatically inserted into the WHERE clause. 8.Now specify the Return Parameters. Find the data source fields in the Name column from which the data is being returned. Click in the Target column and find the app fields that should receive the returned data (Customer Name and City in the example below). If you do not need to populate a specific field, leave it empty. ![]() 9.Select Preview from the App menu to test the lookup. |
See also: Setting Up Popup Lookups
Return to: Calling the Connection from an App, Integration