Skip to content

Cancel_Check - BusinessProcess

Determines whether the process should be interrupted

Type: Function
Return Data Type: Integer

Syntax

Function Cancel_Check Returns Integer

Call Example

Get Cancel_Check to IntegerVariable

Description

Get this to determine whether the process should be interrupted. It can be interrupted by the status panel (cancel) or by an error.

If a cancel or error condition exists, it figures out what to do by calling Process_Interrupt. Whether Cancel_Check stops the process during an error condition is controlled by Display_Error_State.

You are expected to call this message, not to augment it. You can call this function anytime you need to determine if the process should be halted.

Procedure onProcess
    Boolean bStopIt
    :
    Repeat
        : 
        // find record and do the process
        :
        Get Cancel_Check to bStopIt
        If bStopIt ;
            Procedure_Return
        :
    Loop
End_Procedure

By default, Cancel_Check stops the status panel if an error has occurred or the user has clicked the Cancel button to stop the process. To resume the status panel's display when resuming processing, send Resume_Status.

Return Value

Returns non-zero for a cancel