Home » Developer & Programmer » Forms » Stopping forms message Do you want to save the changes...? (Oracle forms 10g)
Stopping forms message Do you want to save the changes...? [message #501071] Fri, 25 March 2011 10:14 Go to next message
Vachaun22
Messages: 10
Registered: March 2011
Junior Member
First, I need to emphasize that I am in no way an Oracle forms developer, this project is for a college course. I'm a C++ programmer by training.

I have a form that I am laying out with a search button, add button, update button, execute button along with a few text boxes that are derived from a database table.

The search button simply clears the form, enables the text box controls for editing, disables all buttons except the execute, and sets a form variable to flag the form is in search mode (add/update work very similarly).

My issue, is since I am clearing the text box controls at run-time, the form believes I have made a change. Now when I click the execute button to issue the commands, I get a message box asking if I would like to save the changes.

This is very troublesome, as no changes have been made, as far as the user is concerned, so they should not see this box.

I have thought about making the form a custom form, but how would I do a generic search where I can step through the records like I can with a form derived directly from a table? Also, I'm not sure that would even make a difference as to whether the message is shown or not.

For someone who programs in an environment where I am in control of most things, this seems counter intuitive, almost to the point of being prohibitive in functionality. Is there a way I can avoid the form wanting to cause a form commit?

Thanks.


--- EDIT ---
I believe I have this solved.

I stopped clearing the controls, and after setting the enabled state as desired and setting the focus to the correct control, I then used the ENTER_QUERY; statement. This seemed to have corrected the issue.

[Updated on: Fri, 25 March 2011 10:19]

Report message to a moderator

Re: Stopping forms message Do you want to save the changes...? [message #501083 is a reply to message #501071] Fri, 25 March 2011 12:34 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you are new to Oracle Forms, I don't know whether you no that - if you create an initial form using the Data Block Wizard - you'll get a form that is capable of performing ALL basic tasks. It includes: inserting new records, querying existing ones, updating fetched values and, finally, deleting records from a table. Forms built-in querying mechanism is quite powerful and, if you know how to properly use it, lets you perform all kinds of searches.

Of course, that initial version mostly requires additional programming, but most things you'd have to program manually are already done.

Reading what you've said, I have a feeling that you, actually, put effort into something that could have been done much easier (following the Wizard). All those "search button, add button, update button, execute button" are there in default Forms toolbar. Maybe I'm wrong, but I think that you'd benefit if you could find Forms manual and read it. It might save you some time and a lot of effort.
Re: Stopping forms message Do you want to save the changes...? [message #501283 is a reply to message #501083] Mon, 28 March 2011 06:30 Go to previous messageGo to next message
Vachaun22
Messages: 10
Registered: March 2011
Junior Member
You are 100% right in using the built in functionality. And I would do that in a normal situation, were I to be building a project that didn't have a lot of "educational" requirements.

Unfortunately, we are required to add a bunch of functionality that is already in oracle forms. That's the only reason why I'm writing in all this existing functionality. To be honest, all the requirements are going to take what could have been a decent nearly production ready build and turn it into a hacky mess.

But I do thank you for the input.
Re: Stopping forms message Do you want to save the changes...? [message #501293 is a reply to message #501283] Mon, 28 March 2011 07:32 Go to previous message
Paules
Messages: 128
Registered: March 2011
Location: United Arab Emirates
Senior Member
Hai,

U can use the following statement under Key-Exit Trigger to supress this error message.
exit_form(no_validate);


Regards,
Paules.
Previous Topic: Age condition trigger
Next Topic: How can I create a "browse for file to upload"-window?
Goto Forum:
  


Current Time: Tue Sep 17 05:00:00 CDT 2024