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;