Home » Developer & Programmer » Forms » Automatic Commit - Multi-tab Form (Forms 10g Version 10.1.2.3.0)
icon5.gif  Automatic Commit - Multi-tab Form [message #447739] Wed, 17 March 2010 12:30 Go to next message
Kevin58
Messages: 79
Registered: January 2009
Member
I have a four tab canvas. The first 3 tabs belong
to one data block. The last tab has two data blocks.

How can I automatically commit changes if the
user clicks on any tab and not necessarily in
tab order?
Thanks,



Kevin

Re: Automatic Commit - Multi-tab Form [message #447752 is a reply to message #447739] Wed, 17 March 2010 13:56 Go to previous messageGo to next message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Pushing the "Save" button (i.e. issuing COMMIT in any of form tabs will commit changes in the whole transaction. It doesn't matter which tab is currently active.
Re: Automatic Commit - Multi-tab Form [message #447754 is a reply to message #447739] Wed, 17 March 2010 14:01 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
Hello,

What trigger(s) should I be looking for or should I use?
Thanks,



Kevin
Re: Automatic Commit - Multi-tab Form [message #447755 is a reply to message #447754] Wed, 17 March 2010 14:03 Go to previous messageGo to next message
Littlefoot
Messages: 20827
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
No trigger; just push the yellow floppy disk icon in the form's standard toolbar.
Re: Automatic Commit - Multi-tab Form [message #447756 is a reply to message #447739] Wed, 17 March 2010 14:09 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
Hi Littlefoot,

A little background. I'm trying to get to a point where
no matter what the user does, changes something on one tab,
then clicks on another tab may or may not make any changes their
and then decides to goto the next record or starts a new query to find other data, etc..

I want to make sure that if they did change anything or created a new record that it gets saved.

Is there anything like an auto commit?
Thanks,
Re: Automatic Commit - Multi-tab Form [message #448245 is a reply to message #447739] Mon, 22 March 2010 05:17 Go to previous messageGo to next message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
No.

Why are you worrying about this?
If the user does anything that'll wipe the data they've entered so far - execute a query, clear a block, exit the form - forms will prompt them to save anyway.

If you really need to do this will WHEN-TAB-PAGE-CHANGED do the job?
icon7.gif  Re: Automatic Commit - Multi-tab Form [message #448292 is a reply to message #448245] Mon, 22 March 2010 10:37 Go to previous messageGo to next message
Kevin58
Messages: 79
Registered: January 2009
Member
I am trying to figure out what trigger to use to generate
a 10 digit key for any new records. This key is used internally
to tie three related tables together. So it is important that
before moving off a new record that it is able to generate that key.

The users I have have been accustomed to how Microsoft Access behaves. It knows to save a record automatically. Whether it be a new record or a change to an existing one.

Just trying to figure out a way to have Oracle Forms do the same.
Thanks,


Kevin
Re: Automatic Commit - Multi-tab Form [message #448296 is a reply to message #447739] Mon, 22 March 2010 11:08 Go to previous messageGo to next message
gregor
Messages: 86
Registered: March 2010
Location: Germany
Member
Hello Kevin58,

you can use the PRE-INSERT-Trigger to fill your Key.

But hold in mind, that when you fill your Key
with a sequence, the table can only hold 9999999999
unique record-Keys.
The better way is, NOT to limmit the Column-size to 10.
or concatenate the SYSDATE with a rotating sequence.
or ....be creativ
Re: Automatic Commit - Multi-tab Form [message #448301 is a reply to message #447739] Mon, 22 March 2010 11:50 Go to previous message
cookiemonster
Messages: 12320
Registered: September 2008
Location: Rainy Manchester
Senior Member
It sounds like you want a master-detail form. Then you'd populate the key from a sequence on the pre-insert trigger on the master block and forms would take care of the other blocks for you.
Previous Topic: Windows To Linux Migration
Next Topic: Alert message
Goto Forum:
  


Current Time: Thu Sep 29 15:58:41 CDT 2016

Total time taken to generate the page: 0.08917 seconds