Home » Developer & Programmer » Forms » "Do you want to save the changes you have made?" with customized procedure
"Do you want to save the changes you have made?" with customized procedure [message #422765] Fri, 18 September 2009 18:30 Go to next message
secchan20
Messages: 31
Registered: April 2005
Member
Hi,

How could I add my procedures (to set various flags) to "Do you want to save the changes you have made" message? Specifically when users select Yes on the message, I want to make sure they go through my procedures.

My procedures are coded in a commit button (when-button-pressed trigger) and key-commit trigger. Users are supposed to hit Commit button or F10 key to save changes, but they sometimes forget to press these keys and try to exit the form or enter another query after making changes and then hit Yes on the message. So some data didn't get correct flags because they skipped my procedures.

Any advice is appreciated.
Thanks.
Re: "Do you want to save the changes you have made?" with customized procedure [message #422795 is a reply to message #422765] Sat, 19 September 2009 06:20 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member


Have you tried to write your procedure in on-commit trigger?

Re: "Do you want to save the changes you have made?" with customized procedure [message #423006 is a reply to message #422795] Mon, 21 September 2009 13:50 Go to previous messageGo to next message
secchan20
Messages: 31
Registered: April 2005
Member
Thanks. On-commit seems to work, but in my case, it causes "illegal restricted procedure" error becase I need to go to 2 different blocks with go_block and set flags depending on values there. Any further advice would be appreciated!

Re: "Do you want to save the changes you have made?" with customized procedure [message #423015 is a reply to message #423006] Mon, 21 September 2009 17:38 Go to previous messageGo to next message
secchan20
Messages: 31
Registered: April 2005
Member
To go around the error, in stead of using on-commit, we are trying to use key-entqry to alert users "please commit first" so that they would go gack to the record they changed.

IF :system.form_status='CHANGED' THEN
alert_user(xxx);
return;
END IF;

Now I like to know how to alert users when they exit a form by clicking x on the top... Is there a built-in trigger? Any suggestion?
Re: "Do you want to save the changes you have made?" with customized procedure [message #423100 is a reply to message #423015] Tue, 22 September 2009 02:20 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have a look at 'When-Window-Closed'.

David
Re: "Do you want to save the changes you have made?" with customized procedure [message #423196 is a reply to message #423100] Tue, 22 September 2009 11:16 Go to previous messageGo to next message
secchan20
Messages: 31
Registered: April 2005
Member
When-window-closed won't work as what I am looking for is a trigger for a form. When-form-navigate won't work either as it is stand alone form.
Re: "Do you want to save the changes you have made?" with customized procedure [message #423303 is a reply to message #423196] Wed, 23 September 2009 04:53 Go to previous messageGo to next message
klat
Messages: 87
Registered: May 2009
Location: Mumbai
Member


You can Change Close allowed property to No and write your code in key-Exit trigger.
Re: "Do you want to save the changes you have made?" with customized procedure [message #423358 is a reply to message #423303] Wed, 23 September 2009 11:11 Go to previous message
secchan20
Messages: 31
Registered: April 2005
Member
Key-exit trigger is what I was looking for. Thank you very much for your advice!
Previous Topic: How to Re-write DDE code for Forms 10g
Next Topic: Want to get image name from specified folder on hard desk
Goto Forum:
  


Current Time: Fri Sep 20 11:38:38 CDT 2024