ui.Dialog.setFieldActive

Enable and disable form fields.

Syntax

setFieldActive(
   fields STRING,
   val BOOLEAN )
  1. fields is the string with the list of field specification, see Identifying fields in ui.Dialog methods.
  2. val is a boolean value.

Usage

The setFieldActive() method can be used to enable / disable form fields.

The fields is a string containing the field qualifier, with an optional prefix ("[table.]column"), or a table prefix followed by a dot and an asterisk ("table.*").

CALL DIALOG.setFieldActive( "customer.cust_addr",
            (rec.cust_name IS NOT NULL) )

Do not disable all fields of a dialog, otherwise the dialog execution stops (at least one field must get the focus during a dialog execution).

When disabling the current field, the AFTER FIELD block of the current field and the BEFORE FIELD block on the next field in the tabbing order will be executed. As a general pattern, do not disable the current field having the focus.