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!

100501- non-ORACLE Exception by RAISE FORM_TRIGGER_FAILURE

MuzaMar 18 2014 — edited Apr 3 2014

I have an option to user if he select I am doing some job(in YES section), If user select 'NO' I have to stop the user from continue(in NO section). So in no section I place RAISE FORM_TRIGGER_FAILURE; in NO section.

Here if I place exception the exception raise an error message 100501, and after user press 'OK' the user still able to proceed,  If i remove the exception part the user is able to continue without any problem.

I want the raise FTF to stop the user.

Below I placed my sample code.

Thank in advance.

BEGIN

  alt_id := Find_alert('ALT_STOP_USER');

  If Id_null(alt_id) then

  Message('Cannot find the alert button ');pause;

  RAISE FORM_TRIGGER_FAILURE;

  Else

  set_alert_property(alt_id,alert_message_text,' Ask user the option');

   set_alert_button_property(alt_id,alert_button1,label,'Yes');

   set_alert_button_property(alt_id,alert_button2,label,'No');

  

   x := Show_alert(alt_id);

  If x = alert_button1 then-- YES

   --- doing my tasks here

  SET_ALERT_PROPERTY('ALT_NOTE',

                  ALERT_MESSAGE_TEXT,

                  'DONE');

  A := SHOW_ALERT('ALT_NOTE');

  Elsif x = alert_button2 then

  SET_ALERT_PROPERTY('ALT_NOTE',

                  ALERT_MESSAGE_TEXT,

                  'Exit!');      

  A := SHOW_ALERT('ALT_NOTE');

  RAISE FORM_TRIGGER_FAILURE; 

  ---need to stop user from processing further

  End if;

  End if;

EXCEPTION

  WHEN OTHERS THEN

    MESSAGE('ERROR ' || SQLERRM);

    RAISE FORM_TRIGGER_FAILURE; 

END;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2014
Added on Mar 18 2014
9 comments
20,854 views