Re: Unwanted FORMS 3 message

From: Stephen Turner <sturner_at_athena.mit.edu>
Date: 1995/04/13
Message-ID: <3mjuqp$5tf_at_senator-bedfellow.MIT.EDU>#1/1


We dealt with this issue in this way:

Define a form-level ON-ERROR trigger something like this:

	message(error_text);
        raise form_trigger_failure;

Then check all the calls of packaged procedures in your source code; each call must have the following code after it:

	if not form_success
        then 
            raise form_trigger_failure;
        end if;

This code can be put in a user-defined procedure called something like check_package_failure

These two things work together to eliminate the annoying messages. The reason you get the acknowledgment message is that forms is trying to display more than 1 message at a time. It pauses with the acknowledgment message to let you see all the messages.

However in a trigger like this:

    KEY-NXTBLK
...

	next_block;
        execute_query;

let's say the upper block has a required field which is blank when the user hits NEXT_BLOCK. The next_block gives a 'field must be entered' error. You really want processing to stop here and return control to the user. But without the above mods to the form, forms goes on to process the execute_query statement, which also (probably) fails with an error message. So forms tries to display 2 messages, hence the acknowledgment. prompt.

With the described mods, your code looks like this:

        next_block;

	if not form_success
        then 
            raise form_trigger_failure;
        end if;
        
        execute_query;

The first error message now goes via your ON-ERROR trigger, which raises the form_trigger_failure. This means that when next_block completes, the form_failure flag is set. The code after next_block now sees this and stops the KEY-NXTBLK trigger without trying to do the unwanted execute_query.

Forms now only has 1 message (field must be entered) to display so you don't get the acknowledgment prompt.

Good Luck,
Steve Turner Received on Thu Apr 13 1995 - 00:00:00 CEST

Original text of this message