Lookup Widget

Use this widget to lookup a table and populate form fields.

Last published at: June 3rd, 2024

Description:

The lookup control displays a data table; once a row is selected, data from the selected row is entered into other fields. 

Inputs

  • ID/Name - Name of widget generated by FlowWright
  • Lookup Button Text - Enter the description text for the lookup button
  • Select Connection -  Choose the connection string (previously configured) 
  • Select Query - Enter a SQL Query 
  • Field Mappings - Map the query field with form fields for display
  • Hide - Select the checkbox to Hide (tick mark)
  • Read Only - Select the checkbox to Read-Only (tick mark)
  • Save - Save the input values
  • Delete - Remove this form widget from the designer page
  •  Close - Close the input popup window
 

 

Design:

 

 

Example: 

Let’s build and execute the “LookUpDef” example.  

  • Create a new form definition called “LookupDef.
  • Select the Open Designer checkbox and click the “Create” button
  • Drag the Label, TextBox, and Lookup controls and arrange them on the canvas as shown in the above graphic. In this context, the text boxes are named textUserName, textUserID, and textUserCulture. 
  • Double-click on the Lookup widget to configure the inputs, as shown in the graphic below. Select the DB connection. Provide a valid SQL query and map the query fields and form fields to store the result when the selection is done.  

 

  • Save the form definition. Navigate to the UI menu and Preview the form. Provide the user name text value and click the Lookup button to search by this reference. A popup window displays the list where the value is contained. Select a record from the table and click OK. 

 

  • Select a record from the table and click OK. The values are mapped to field controls as configured, and the form is rendered as shown in the graphic below.