Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to prevent duplicate error messages in Forms.

539222Oct 2 2007 — edited Dec 2 2011
Hello,

When I have a problem on a datablock, I usually do a "Raise Form trigger Failure" to stop the trigger and display a message. But if the datablock has a relationship to another block, the system will try to do the ON-POPULATE-DETAILS and the QUERY-MASTER-DETAILS to complete the relationship process. In the QUERY-MASTER-DETAILS, there are statements listing the following

IF reldef = 'FALSE' THEN
GO_BLOCK(DETAIL);
Check_Package_Failure;
:System.Message_Level := 10;
Execute_Query;
:System.Message_Level := oldmsg;
ELSE

The problem occurs in the GO_BLOCK(DETAIL). An error message has already shown before the system reaches this line. When the GO_BLOCK(DETAIL) occurs, the system will jump to the block connected in the relationship. I have a WHEN-VALIDATE-RECORD on the original block. Doing the GO-BLOCK will cause the WHEN-VALIDATE-RECORDS to process again. This causes the original error message to appear again. The user sees the message appearing twice on their screen. Once the GO-BLOCK process has completed, the CHECK_PACKAGE_FAILURE starts and the system completes the process.

My question is how can I handle this situation so that the second message does not appear because of the GO_BLOCK process? I don't want to break the relationship process. I just want a clean way to deal with the second message because of the second validation.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 30 2011
Added on Oct 2 2007
10 comments
3,576 views