Description:
Look up and display data in a table — Displays database query results in a table within a FlowWright form, allowing users to search for data and select a row for further processing.
Inputs
- FormID - Name of the widget generated by FlowWright (read-only field)
- Database Connection - Choose the connection string (previously configured)
- SQL Query - Enter a SQL Query
- Hide - Select the checkbox to hide (tick mark)
- Lock Widget - Click the button to toggle the lock/unlock feature
- Save - Save the input values
- Delete - Remove this form widget from the designer page
- Close - Close the input popup window
Design:
The LookupViewData widget is a FlowWright form widget in the Engine category. It is implemented by FlowWright.Forms.clsLookupViewData in FlowWright.Forms.dll and is displayed in the form designer as Lookup and display data on table.
The widget accepts a SQL query and a database connection as required inputs. It also defines two events: onSelectedRow, which supplies a selected row ID, and onSearchClicked, which supplies a search term.
LookupViewData is a form widget, not a conventional workflow process step. It presents database-backed information in a table and provides user interactions through the defined events.

Use the LookupViewData widget when a FlowWright form needs to display database records in a table and allow users to search or select a record.
The widget requires a SQL query and a database connection. These inputs determine which query and connection the widget uses to retrieve the information displayed in the table.
Typical Workflow Suggestions:
Customer Record Lookup
Use LookupViewData on a customer service form where users need to find and select an existing customer record.
Example workflow:
Start → Customer Lookup Form → Search Customers → Select Customer → Retrieve Customer Details → End
The widget can display customer records from a database. When a row is selected, the onSelectedRow event provides the row ID for use by the configured form logic.
Employee Information Lookup
Use the widget on an HR form where authorized users need to locate an employee record.
Example workflow:
Start → Employee Lookup Form → Search Employees → Select Employee → Review Employee Details → End
The SQL query retrieves the employee information needed for the lookup. The database connection specifies where the query is executed.
Product or Inventory Lookup
Use LookupViewData on an inventory form where users need to find a product or stock record before continuing with an inventory activity.
Example workflow:
Start → Inventory Form → Search Products → Select Product → Update Inventory Information → End
The widget can display product records and provide the selected row ID through onSelectedRow.
Service Request Lookup
Use the widget on a support form where users need to locate an existing service request.
Example workflow:
Start → Service Request Lookup → Search Requests → Select Request → Review Request Details → Process Request → End
The onSearchClicked event provides the search term, while onSelectedRow provides the selected row ID. The surrounding form logic can use these event values as required.
Order Record Lookup
Use LookupViewData on an order management form where users need to search for and select an existing order.
Example workflow:
Start → Order Lookup Form → Search Orders → Select Order → Review Order Details → Process Order → End
The SQL query can retrieve the order information the table needs. The selected row ID can be used by the configured form logic to identify the chosen order.
Example:
Let’s build and execute the “LookupViewDataDef” example.
- Create a new Form Definition called “LookupViewDataDef.”
- Drag the “BootstrapGrid, Label, LookupViewData, and Submit” controls onto the canvas and position them as shown below.

- Double-click the “LookupViewData” control to configure the “Settings” properties. A pop-up window appears for configuration. Enter a name for the control. Enter the SQL SELECT query as shown below. Select the DB connection from the drop-down list. Check the “Hide” checkbox to hide this widget at runtime. Click the “Lock Widget” button to toggle the lock/unlock feature and prevent accidental configuration changes. Click the “Save” button.

- Double-click the “LookupViewData” control to configure the “Styling” properties. Enter the RGBA values for the background color. Enter the pixel values for the minimum height and width. Click the “Save” button.

- Save the Form Definition. Choose Actions > Create Form Instance. Generate a new Form Instance, then check the box to edit this Form Instance.

- The form displays for the user as shown below. Enter a value and click the Search button. The “LookupViewData” shows the search results in a table. Click the Submit button to finish.

Tips:
- Use an appropriate SQL query: Select only the columns needed for the lookup experience.
- Verify the database connection: Ensure the selected connection points to the intended database and has the required permissions.
- Design for searchability: Choose query results that help users identify the required record.
-
Handle row selection: Configure the surrounding form logic to use the
rowIDsupplied byonSelectedRow.
- Handle search input carefully: Validate or safely parameterize search-related SQL in the implementation. Do not concatenate untrusted search text directly into SQL statements.
- Test database access: Verify behavior when the query returns no rows or the database connection is unavailable.
- Protect sensitive data: Limit query results to the records and columns that the intended users are authorized to access.
Definition Sample:
You may download and extract the sample definition(s) from the link provided and later import them (drag-and-drop) into your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: After the import, verify and complete any missing configuration steps, such as file path references and database connections. Then, save the definition to confirm the changes.
Click here to download the sample file.