This section describes the purpose of the ON CHANGE interaction
block.
The
ON CHANGE interaction block can be used in different ways:
- With form fields allowing only entire value input such as CHECKBOX,
or using an additional widget such as a calendar in a DATEEDIT:
ON CHANGE can be used to detect an immediate value change, or the
selection of a value in the additional widget, without leaving the field.
- With text fields like EDIT (allowing incomplete values), defined
with the COMPLETER attribute to implement autocompletion: In this
case the ON CHANGE trigger is fired without leaving the field, when
the user types characters in (after a short delay).
- With text fields like EDIT (allowing incomplete values): ON
CHANGE can be used to detect a value change, when the field is left.
A typically usage of ON CHANGE is for example with a
CHECKBOX, to enable/disable other form elements according to the value
of the checkbox field:
INPUT BY NAME rec.* ...
...
ON CHANGE input_details -- can be TRUE or FALSE
CALL DIALOG.setFieldActive("address1", rec.input_details)
CALL DIALOG.setFieldActive("address2", rec.input_details)
...
END INPUT
The dialogtouched predefined action can also be used to detect field
changes immediately, but with this action you can't get the data in the target variables;
this special action should only be used to detect that the user has started to modify data
in the current dialog.