Usage / INPUT ARRAY control blocks |
The AFTER INPUT block is executed after the user has validated or canceled the INPUT ARRAY dialog with the accept or cancel default actions, or when the ACCEPT INPUT instruction is executed.
The AFTER INPUT block is not executed when the EXIT INPUT instruction is performed.
This block is typically used to implement global dialog validation rules depending from several rows of the list. If the values entered by the user do not satisfy the constraints, use the NEXT FIELD instruction to force the dialog to continue. The CONTINUE INPUT instruction can be used instead of NEXT FIELD, when no particular field has to be select.
Before checking the validation rules, make sure that the INT_FLAG variable is FALSE: in case if the user cancels the dialog, the validation rules must be skipped.
DEFINE arr DYNAMIC ARRAY OF RECORD LIKE table.* ... INPUT ARRAY arr WITHOUT DEFAULTS FROM sr.* ATTRIBUTES ( UNBUFFERED ) ... AFTER INPUT IF NOT INT_FLAG THEN IF arr.getLength() < 10 THEN ERROR "List is incomplete, needs 10 lines." CONTINUE INPUT END IF END IF END INPUT