With a Lookup element you can create and customize a search against a data source ( like SQL Server, OLEDB, ODBC or Reference Data etc). In addition:
-
You can drag and drop a Lookup element onto a cell in a Repeating Table to bind the lookup to the table cell.
-
You can drag and drop a Lookup element onto a Repeating Group to bind the lookup to that group.
-
Provide the Filter with brackets around the connection column name, when working with Solution Data Library or Reference Data connection types.
-
The sorting and search functionality in this control works only if the corresponding data connection allows for it. For example, the Group data connection does not allow for a filter, so search does not work for it.
-
After exporting the solution, open the Set Field dialog once to see the correct field names.
-
Filter property of Lookup Control has been disabled for userfromgroup Data Connection.
Back to Form Elements
Related topic: Element Properties
|
Property |
Description |
|---|---|
|
Name |
A descriptive name for the element. |
|
Data Source |
Name of the Data Connection. |
|
Table |
Name of the table in the specified data source. |
|
Display Columns |
Comma-separated list of columns to display in the pop-up selection window. |
|
Set Fields |
Comma-separated list of query return values and fields to set in the form. The format is: <Form field name>=<Column in Data Connection>, <Form field name>=<Column in Data Connection>, …. |
|
Search Column |
Name of the database column that is being queried. |
|
Search Operator |
Operator to use in the query (valid values are <, >, =, !=, <=, >=, like). |
|
Search Key Field |
Form field containing the value to use in the constructed query. |
|
Minimum Search Key Size |
Minimum character size for the query term. |
|
Auto Wildcard End |
Automatically appends a SQL wildcard character to the end of the where clause. |
|
Auto Wildcard Start |
Automatically appends a SQL wildcard character to the beginning of the where clause. |
|
Auto Run At Start |
Query runs when the form starts. |
|
Auto Run At End |
Query runs when the form is submitted. |
|
Run When Field Changes |
Returns the lookup query when a specific field is changed. |
|
Form Run Query Only |
Runs only the query portion of a Lookup element when a form field value is changed, skipping the step where another form field’s value is set. The default value is off. |
|
Allow Multiple Selections |
Allows you to select multiple listings from the returned query results when the pop-up option is selected. The default value is off. |
|
Append To Repeating Group |
Appends results to an existing repeating group. The default value is off. |
|
Raw "Where" Clause |
Allows you to specify a custom where clause for a SQL statement. If you are using Search Column, Search Operator, and Search Key Field, it will result in a where clause that includes only a single condition. If you want more conditions, you must specify a custom where clause. |
|
Autorun Lockouts |
When using multiple Lookup elements that run when a field values change, circular references can occur if one Lookup element is attempting to update a field that is being used by another Lookup element (i.e. causing an infinite loop). The Autorun Lockout property can be set to a comma-separated list of field names that are referenced by other Lookup elements. This will enable the Lookup element to run and it will not update the fields in the comma-separated list. |
|
Interactive |
How the query data is shown.
The properties "Auto Run At Start”, "Auto Run At End" and "Run When Field Changes” are not applicable to the "Interactive" option. |
|
Clear Fields When Empty Return |
Checking this box will cause form fields to be cleared if the query/lookup element does not find any results (data/rows) to display. |
|
Ordinal |
In case of multiple lookup elements on the same form view, the order to use when running this Lookup element. |
|
Image URL |
The URL to an image to use when displaying the Lookup element button in the form. |
|
Image Field Association |
The form field which will be replaced with the image specified in ‘Image URL’ property. |
The following procedures show you how to map fields from an external data source for example, a SharePoint List to populate a drop-down list in a form. This can be useful for forms where you want the form to look up data (such as an approved vendor list for a purchase order) to populate a drop-down box on a form.
Adding and configuring a Lookup element
-
In the Properties pane, click Elements.
-
Click Advanced Elements.
-
Click Lookup element.
Tip: Place a Lookup element next to the element that will be associated with the lookup. (For example, place a Company Lookup next to the Company field.) -
In the canvas, click the inserted Lookup element to open the Properties for it in the Properties pane.
Connecting a Lookup element to a data source
-
Click the Lookup element you want to connect to a data source.
-
In the Properties pane, on the Properties tab, under Data Source, click the drop arrow.
-
Select the data source from the drop-down menu.
-
Under Display Column, click the drop arrow.
-
Select the columns you want the Lookup element to access. The selection(s) will be displayed as the options in your form's drop-down menu.
-
Under Set Fields, click Choose.
-
In the Set Fields dialog box, under Field, open the drop-down menu.
-
In the drop-down menu, select the field that you want to assign to the column.
-
Under Column, open the drop-down menu, and then select the column you want to assign to the field.
-
Click Add.
-
Repeat steps 6–10 for each field or column you need to map.
-
Click OK.
Connecting a Lookup element to a form field
-
In the canvas, click the Lookup element.
-
In the Properties pane, scroll down until you see Image Field Association.
-
Under Image Field Association, click the drop arrow to view a list of fields in the form.
-
Select the form field to which you want to attach the lookup field.