Add a relational database lookup button to a validation form

A Relational Database Lookup uses a Microsoft SQL Server, ODBC DSN, or Oracle database. You configure this database on the Project Settings - Databases tab before you can add the lookup.

A Relational database has different properties, and as a result, has slightly different behavior than the other lookup types.

Important If you configure a database lookup using Microsoft SQL Server 2005 or later, do not include XML data fields because the search cannot parse and support this data type.

You can add a relational database lookup button to your validation form by following these steps:

  1. Open the Project Tree window if it is not already open.
  2. In the Project Tree, select the class that requires a lookup button on its validation form.
  3. Right-click on the class and select Customize Validation Form from the shortcut menu.

    If there are multiple steps of validation, you are prompted to select an individual step.

    The Validation Form Layout window is displayed.

  4. On the Validation Form Layout window toolbar, click Add Database Lookup Button Database Lookup Button icon.

    The database lookup details are displayed in the properties pane to the right of the image.

  5. Optionally, increase the width of the properties pane. Hover over the space between the properties pane and the document pane until the mouse changes, and then drag the mouse to the left as far as required.
    Note Any changes you make here to the window layout are saved. The next time you open the validation form, the same layout is displayed.

    The properties pane is larger so that you can see all of the options available.

  6. Expand the Database Lookup property.

    The Data Source Type and several other options become visible.

  7. In the Data Source Type list, select Relational Database.

    The Data Source list is displayed with the databases configured for the project.

  8. In the Data Source list, select the desired database.
  9. Map the validation form fields for the database lookup.
  10. Type a maximum number of results to be returned in the Search Results window.
  11. Set the Field Visibility and decide what fields are displayed in the Search Results window.
  12. Choose whether to use Configurable Wildcards by selecting an option from the list.
  13. Type a Dialog Caption title.

    This text is displayed as the title of the lookup results window in Validation. For example, Search Results.

  14. Optionally, type a List Caption label.

    This text is displayed inside the lookup results window above the list of results. For example, Select one of the following records.

  15. Optionally, change the shortcut key by selecting an option in the Shortcut list.
  16. Edit the button text in the Text field to change the button label.

    This text appears on the validation form button. For example, Search.

  17. When you are finished, on the Windows menu, click Close.

    The Validation Form Layout window is closed and your changes are saved.