Describes the processing that occurs when the ENDKEY condition occurs during a block. This condition usually occurs when the user presses END-ERROR during the first interaction of a block iteration, or any time the user presses a defined END-KEY.
If you use a REPEAT or FOR EACH block, the default processing for ENDKEY is to undo all the processing in the current iteration of the block, then leave the block and continue on to any remaining statements in the routine.
ON ENDKEY UNDO [label1] [ , LEAVE [ label2 ] | , NEXT [ label2 ] | , RETRY [ label1 ] | , RETURN [ return-value | ERROR [ return-value | error-object-expression ] | NO-APPLY ] |
RETRY is the default if you do not specify of LEAVE, NEXT, RETRY, or RETURN.
Option | Description |
---|---|
return-value | The CHARACTER string you provide is passed to the caller. The caller can use the RETURN-VALUE function to read the returned value. |
ERROR | Raises ERROR in the caller and undoes the current subtransaction. |
ERROR return-value | Raises ERROR in the caller and undoes the current subtransaction. The CHARACTER
string you provide is passed to the caller. The caller can use the
RETURN-VALUE function to read the returned value. The AVM also creates a Progress.Lang.AppError object and stores the return-value in the ReturnValue property. Note: User-defined functions have different
behavior since they must return the data type specified in the definition.
See the FUNCTION statement for more
information.
|
ERROR error-object-expression | Raises ERROR in the caller and undoes the current subtransaction.The specified error object is created and populated according to your code. If this is an Progress.Lang.AppError object, the caller can use the RETURN-VALUE function to read the setting of the ReturnValue property. |
NO-APPLY | In a user-interface trigger, prevents the AVM from performing the default behavior for that event. |
You cannot specify ERROR within a user-interface trigger block or a destructor. You can specify the NO-APPLY option only within a user-interface trigger block.
In this procedure, if the user presses END-ERROR or END-KEY while changing the CreditLimit field, any changes made during the current iteration of the block are undone, and the same iteration is run again. If this procedure did not use the ON ENDKEY phrase and the user pressed END-ERROR, the procedure ends because the default ENDKEY action is UNDO, LEAVE. After leaving the FOR EACH block, the procedure ends because there are no more statements.
r-endky.p