Unexpected trigger results

From: Don Haney <hey_at_ornl.gov>
Date: 20 Aug 1998 21:18:19 GMT
Message-ID: <01bdcc7f$fa2fee40$558ba786_at_dshey2.dsrd.ornl.gov>



Thanks to all for their responses to my previous posts. I now have a new problem. I'm running Forms v 4.5 in Developer 2000.

I have the following in a When-Button-Pressed trigger:

declare

   resp number;
begin

   Validate(Block_scope);
   if not form_success then

      resp := Show_Alert('Exit_al');
      if resp = Alert_Button1 then
         Exit_Form(No_validate);
      else
         raise form_trigger_failure;
      end if;
   else
      commit_form;

   end if;
end;

The button pressed is an Exit button. If the block is valid, I want to commit their changes. If not, an stop-type alert is displayed asking the user if they would like to exit anyway and lose their changes or return to the form. If the user selects "Exit", the form exits without validation. The user should see nothing else.

However, that's not what's happening. The validation displays an error message on the message line. The alert is displayed. When exit is selected and the Exit_Form builtin is executed, the message on the Message line is displayed in a Modal window. I don't want the user to see that message, but I can't find any means of stopping it. I've tried other approaches and it seems there's no way to exit without seeing the message. I get the same results if I try to do a commit_form and exit if there's a failure.

I plan to try raising a user defined exception since the builtins don't raise an exception on error. Does anybody have any ideas?

Thanks in advance,

Don Haney Received on Thu Aug 20 1998 - 23:18:19 CEST

Original text of this message