Home » Developer & Programmer » Forms » clearing the form after commit (Oracle Form Builder 10g, Win XP)
clearing the form after commit [message #520840] Thu, 25 August 2011 00:56 Go to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
Is it possible to clear the form after a successful commit? In order to avoid the user from double posting of record by making double commit.
Re: clearing the form after commit [message #520842 is a reply to message #520840] Thu, 25 August 2011 00:58 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Yes... use CLEAR_FORM;
Re: clearing the form after commit [message #520844 is a reply to message #520842] Thu, 25 August 2011 01:07 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
in which trigger? post-form_commit or in post-database-commit
Re: clearing the form after commit [message #520848 is a reply to message #520844] Thu, 25 August 2011 01:44 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
Just after the COMMIT issue CLEAR_FORM.
Re: clearing the form after commit [message #520849 is a reply to message #520848] Thu, 25 August 2011 02:12 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
there is no mannual commit is used in the form. It is a default form.
Re: clearing the form after commit [message #520850 is a reply to message #520849] Thu, 25 August 2011 02:29 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
then how the records are being saved through forms if there is no commit issued.
Re: clearing the form after commit [message #520851 is a reply to message #520850] Thu, 25 August 2011 02:33 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
u misunderstood me. the records are being saved through the default commit of the form. like some record entered and then save button (default form button) is pressed to commit
Re: clearing the form after commit [message #520852 is a reply to message #520851] Thu, 25 August 2011 02:39 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
you mean to say that your form is using form's default toolbar's save button?

[Updated on: Thu, 25 August 2011 02:39]

Report message to a moderator

Re: clearing the form after commit [message #520853 is a reply to message #520852] Thu, 25 August 2011 02:49 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
yes
Re: clearing the form after commit [message #520854 is a reply to message #520853] Thu, 25 August 2011 02:50 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
ok in that case I would suggest that you should use POST-Commit for CLEAR_FORM
Re: clearing the form after commit [message #520860 is a reply to message #520854] Thu, 25 August 2011 03:05 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
I assume you mean post-forms-commit? You can't call clear_form from that or any of the commit triggers apart from key-commit and key-commit can be bypassed.

@new_oracle2011 - Why do you think you need to do this? What do you think is going to happen if the user presses save twice?
It shouldn't cause any issues.
Re: clearing the form after commit [message #520864 is a reply to message #520860] Thu, 25 August 2011 03:08 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
I agree with you my friend cookiemonster that just after commit if commit or save is done again there will be nothing to save... no commit will issue again.
Re: clearing the form after commit [message #520865 is a reply to message #520854] Thu, 25 August 2011 03:14 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
sorry, there is nothing like this thing in Oracle Form Builder 10g.
Re: clearing the form after commit [message #520867 is a reply to message #520865] Thu, 25 August 2011 03:16 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
Nothing like what thing?
Re: clearing the form after commit [message #520868 is a reply to message #520865] Thu, 25 August 2011 03:17 Go to previous messageGo to next message
azamkhan
Messages: 557
Registered: August 2005
Senior Member
I didnt coated the Oracle message or error. My dear I have said that if one try to save an alrady saved record nothing will happen becasue the state of the record is query only insert or changed status records allowed to save.
Re: clearing the form after commit [message #520870 is a reply to message #520868] Thu, 25 August 2011 03:35 Go to previous messageGo to next message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
@all: sorry i posted that message before refreshing the page

@azamkhan: post-commit not exists. either there is post-database-commit or post-form-commit. I appreciate that you are trying to help me

yes, if there is no change in the form then no matter if u press 100times save button nothing will happen. here some users are dumb, they just want to clear the screen after pressing the save button in order that they have save the records.
Re: clearing the form after commit [message #520871 is a reply to message #520870] Thu, 25 August 2011 03:43 Go to previous messageGo to next message
cookiemonster
Messages: 13926
Registered: September 2008
Location: Rainy Manchester
Senior Member
I think the users really ought to learn to do that for themselves.
You could put clear_form in the key-commit trigger. I normally advise against using that trigger since there are various ways to bypass it, but in this particular case it shouldn't matter.
Re: clearing the form after commit [message #520872 is a reply to message #520871] Thu, 25 August 2011 03:52 Go to previous message
new_oracle2011
Messages: 174
Registered: March 2011
Location: Qatar
Senior Member
thanks cookiemonster and i hope this will not cause new problems for me Smile
Previous Topic: problem with invoice number generation
Next Topic: Current Record Indicator
Goto Forum:
  


Current Time: Fri Jul 26 09:08:51 CDT 2024