Configuring DBLookups for user input

When you specify text in a DBLookup field, clicking the DBLookup displays only results matching the text in that field. If multiple records exist, the DBLookup layer opens with the possible choices. When the specified value does not resolve to a valid value, the DBLookup layer will open so that you can search for the correct value.

You can configure a DBLookup field in one of these two ways:

  • The field can be populated by typing in a value or selecting a value from the lookup.
  • The field can only be populated by selecting a value from the lookup.

The DBLOOKUP_DEFAULT_EDITABLE registry parameter specifies whether user input will be accepted for all DBLookup fields by default. The valid values for this parameter are True and False. The registry setting is located under /system/workbrain_parameters/dblookup_default_editable.

The default value of this registry setting depends on the application version.

Application Version Default Value for DBLOOKUP_DEFAULT_EDITABLE
New installation (version 5.0.3.0 or higher) True
Upgraded installation (from version 5.0 fixpack 22 or lower) False

This dependance means that if you have an existing installation that you are upgrading from version 5.0 FixPack 22 or lower, you will need to configure the registry setting so that user input is accepted by default. For new or existing installations using version 5.0.3.0 or higher, no configuration is necessary.

The labelFieldStatus field configuration parameter specifies whether user input will be accepted for an individual DBLookup. This parameter can be either undefined, or set to:

  • Edit: label is an editable field
  • Default: the default based on the registry setting
  • Hidden: hides the label field
  • None: the label field will not be created at all
  • Disabled: label is a non-editable field

This table summarizes whether a DBLookup field is editable depending on both the registry setting and the field-configuration parameter.

Value of the DBLOOKUP_DEF AULT_EDITABLE Registry Parameter Value of the labelFieldStatus Field-Configuration Parameter
Edit Disabled Default Hidden None
True Edit Not editable Edit Not editable Not editable
False Edit Not editable Not editable Not editable Not editable