Solved

Oracle Form 5

Posted on 2001-06-30
5
1,614 Views
Last Modified: 2012-06-27
I want to supress the default message 'Do you want to save changes?' in Oracle Form 5. how to do that?

Thanks
Abdul Qadir Khan
0
Comment
Question by:aqk139
5 Comments
 
LVL 6

Accepted Solution

by:
M-Ali earned 200 total points
ID: 6241907
When are you getting this message?

For suppressing normal messages in forms, you can set
:SYSTEM.MESSAGE_LEVEL := value

But prompts and vital error messages cannot be suppressed using this.

If you want to clear a form without saving use, CLEAR_FORM(NO_VALIDATE);


Ali
0
 
LVL 2

Expert Comment

by:noriegaa
ID: 6243709
You could also use exit_form(no_validate); or simply exit(no_validate);
0
 

Expert Comment

by:schudasama
ID: 6243965
Hi,

This is how i have done and it works. Create a save button. In the when button_pressed trigger
declare
 al_button number;
 al_id ALERT := find_alert('caution');
begin
 if :global.insertupdateflag = 1 then
   (globally defined variable)
 set_alert_property('caution',alert_message_text,'Do You want to save the changes (Y/N) ?');
 set_alert_button_propert(al_id,alert_button1,label,'Yes');
 set_alert_button_property(al_id,alert_button2,label,'No');
 al_button := show_alert(al_id);
 if al_button = alert_button1 then
   goto commitblock;
 else
   goto endblock;

<<commitblock>>
:global.errcode = 0 then
 commit;
if :global.errcode = 1 then
 goto endblock;
end if;

<<endblock>>
null;

end

here the commitblock is where you are saving the changes. if the errorcode (errcode) is 0 then it will commit otherwise it will go to the endblock and wll not commit the changes.

Hope this will help you.

0
 

Expert Comment

by:schudasama
ID: 6243968
Hi,

This is how i have done and it works. Create a save button. In the when button_pressed trigger
declare
 al_button number;
 al_id ALERT := find_alert('caution');
begin
 if :global.insertupdateflag = 1 then
   (globally defined variable)
 set_alert_property('caution',alert_message_text,'Do You want to save the changes (Y/N) ?');
 set_alert_button_propert(al_id,alert_button1,label,'Yes');
 set_alert_button_property(al_id,alert_button2,label,'No');
 al_button := show_alert(al_id);
 if al_button = alert_button1 then
   goto commitblock;
 else
   goto endblock;

<<commitblock>>
:global.errcode = 0 then
 commit;
if :global.errcode = 1 then
 goto endblock;
end if;

<<endblock>>
null;

end

here the commitblock is where you are saving the changes. if the errorcode (errcode) is 0 then it will commit otherwise it will go to the endblock and wll not commit the changes.

Hope this will help you.

0
 
LVL 2

Expert Comment

by:racher
ID: 6244558
Are you wanting to save and exit or cancel and exit?

Route all exiting via one form procedure
If you want to cancel and exit use EXIT_FORM(NO_VALIDATE) as suggested.
If you want to save and exit use COMMIT;
You may want to hide the messages
40400 : transaction complete: x records applied and saved
40401 : no changes to save
You can do this by putting something in the form on-message trigger that examines the MESSAGE_CODE and then supresses the messages that you want to supress.

Graham
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now