LookupComboBox

The LookupComboBox control is used for columns with lookup validation rules so that a drop-down is automatically set up in a Combobox, making the correct list of codes available for the user to select from.

Properties

The Control has a pop-out dialog which allows the designer to view or set the table and column through which the code list is derived (using the configured validation rules). The drop-down style can also be set.

Key properties of the LookupComboBox control include:

  • ColumnName. Specifies the name of the Column in the database.

  • Connection. Specifies the connection to be used for the LookupComboBox.

  • ItemStyle. Configures the display style for items in the LookupComboBox - Code, CodeDescription, Description or DescriptionCode.

  • TableName. Specifies the table from the connected data set.

The combination of TableName and ColumnName is then used to interrogate the GB_VALIDATION_RULES table to find the applicable lookup category (or categories) based on active Lookup Validation rules. The category (or categories) will then be used to get the list of active codes and descriptions from the GB_LKP_CODE table.

Note Lookups displayed are only based on the active validation rules that are not based on foreign key relationships.

Events

Events can be configured for the LookupComboBox to specify the behaviour of the control. For example, an action can be triggered when the control is clicked using the Click property.

For information on configuring events and other components of the design using a script, see: Working with Scripts.

Adding a LookupComboBox

The simplest way to use LookupComboBox is through the Add labels and controls feature in the Data Explorer.

Columns with active rules will then automatically use this control and the TableName and FieldName will be set automatically.

The control can also be used manually, as follows:

When you drag a LookupComboBox control to a form in the Flow Designer, it will be given a default name and you can move and resize the control using the mouse.

The Properties pane can be used to configure the Text and other required properties for the LookupComboBox.

Note: Validation rules apply to the selection of columns for the LookupComboBox. All validation requirements must be met to ensure lookup items are available from the control on the Flow form.

If you click the Start Debugging button in the Flow toolbar (or select Debug | Start Debugging from the menu), you will see a preview of the form:

Information on creating a lookup table for a ComboBox and other controls can be found at the link to Microsoft® Documentation.