Usage / DIALOG control blocks |
The BEFORE INPUT block is executed when the focus goes to a group of fields driven by an INPUT or INPUT ARRAY sub-dialog. This trigger is only invoked if a field of the sub-dialog gets the focus, and none of the other fields had the focus. When the focus is in a list driven by an INPUT ARRAY sub-dialog, moving to a different row will not invoke the BEFORE INPUT block.
In singular INPUT and INPUT ARRAY instructions, the BEFORE INPUT is only executed once when the dialog is started, while the BEFORE INPUT block of the DIALOG instruction is executed each time the group of fields gets the focus.
BEFORE INPUT is executed after the BEFORE DIALOG block andbefore the BEFORE ROW, BEFORE FIELD blocks.
When using an INPUT ARRAY sub-dialog, the DIALOG.getCurrentRow() method returns the index of the current row when it is called in the BEFORE INPUT block.
In this example, the BEFORE INPUT block is used to set up a specific action and display a message:
INPUT BY NAME p_order.* BEFORE INPUT CALL DIALOG.setActionActive("validate_order", TRUE) MESSAGE "Enter order information"