AFTER FIELD block

An AFTER FIELD block is executed each time the cursor leaves the specified field, when moving the focus from field to field, for example by pressing the Tab key.

The AFTER FIELD block is executed for the current field when dialog validation is done with the accept action or by the ACCEPT INPUT instruction.

Implement field value validation rules in AFTER FIELD block and use the NEXT FIELD CURRENT instruction to force the user to stay in the current field and enter another value.
INPUT BY NAME cust_rec.*
   WITHOUT DEFAULTS
     ATTRIBUTES(UNBUFFERED)
   ...
   AFTER FIELD cust_address
      IF cust_rec.cust_address IS NULL THEN
         ERROR "Enter an address for this customer"
         NEXT FIELD CURRENT
      END IF
   ...
END INPUT