Allowing the User to Cancel the Query Operation

The query-by-example application demonstrates methods used to allow users to cancel an interactive dialog statement using predefined actions and conditional logic.

You can handle user Cancel actions or interrupts gracefully during interactive dialog instructions such as CONSTRUCT, using the built-in global integer variable INT_FLAG and the DEFER INTERRUPT statement. Use conditional logic statements to test for user cancel or interrupt actions and specify statement blocks to execute conditionally based on the results.

Figure: User Cancels query and exits back to the main menu


This figure is a screenshot that shows proper handling of a user cancel action or interrupt. The user has selected the predefined Cancel action while performing a query-by-example and has been returned to the main menu.