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!

catch which button clicked in alert

697151Apr 3 2010 — edited Apr 4 2010
Dear all,

I'm use Oracle forms 10g in windows xp, i'm trying to make a simple example about how to catch

which button that operator's clicked. I fired my alert by button, I mean when I pressed

on a button it will fire my alert with 3 buttons, the initially message appear on this alert is defined on the property

palette say to operator (CHOSE ONE OF THEM), the operator have three option (Yes, No, Cancel).

I need when the operator clicked on (Yes button) the same alert fire again with new message say

(You clicked on (Yes))

this my code but the same alert it's not fire again with new message.
declare
	al_id alert;
	selected_button number;
	msg1 varchar2(10);
	msg2 varchar2(10);
	msg3 varchar2(10);
begin
	al_id:=find_alert('my_alert');
	if Id_Null(al_id) then 
		Message('User_Warning alert does not exist'); 
		RAISE Form_Trigger_Failure; 
	end if; 
		/* 
               ** Show the warning alert
                */ 
	selected_button := Show_Alert(al_id); 
	if selected_button=ALERT_BUTTON1 then
	  msg1:='You clicked on (Yes)';
          set_alert_property(al_id, alert_message_text,msg1);
          selected_button:=show_alert(al_id);
	elsif selected_button=alert_button2 then
	  msg2:='The operator clicked on (No)';
	  set_alert_property(al_id, alert_message_text,msg2);
		selected_button:=show_alert(al_id);
	elsif selected_button=alert_button3 then
	  msg3:='The operator clicked Cancel';
	  set_alert_property(al_id, alert_message_text,msg3);
	  selected_button:=show_alert(al_id);
	end if;
	
end;

	
		
plz I need your help

regards

thanks
This post has been answered by Ammad Ahmed on Apr 3 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2010
Added on Apr 3 2010
10 comments
2,247 views