Home » Developer & Programmer » Forms » Possible to override Forms commit behaviour?
Possible to override Forms commit behaviour? [message #216996] Wed, 31 January 2007 03:42 Go to next message
mchchan
Messages: 2
Registered: January 2007
Junior Member
Hi all,

My understanding on Forms is that it will commit certain no. of rows when I press the "save" button in the toolbar. Is it possible to override this so that forms will ask for commit when I navigate to other rows?

e.g.
(1) Fetched 3 records upon query.
(2) Position cursor at row 2 and make some changes.
(3) Navigate to first record.
(4) Forms ask for commit automatically.
(5) If confirm, save row 2 and navigate to row 1. Otherwise, cursor remain at row 2.

Step (4) & (5) are what I intended to do.

Thanks in advance.
Mike
Re: Possible to override Forms commit behaviour? [message #217005 is a reply to message #216996] Wed, 31 January 2007 05:10 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
In PRE-RECORD or WHEN-VALIDATE-RECORD trigger check the record status. Use an alert and display a popup.

By
Vamsi
Re: Possible to override Forms commit behaviour? [message #217043 is a reply to message #217005] Wed, 31 January 2007 08:22 Go to previous messageGo to next message
mchchan
Messages: 2
Registered: January 2007
Junior Member
I tried using those triggers. However, the trouble is when WHEN-NEW-RECORD-INSTANCE fires, it already left the record which has outstanding changes. As such, I need to remember the "record numbers" (one for the record which has been changed; and the other for which will be navigated to). This is quite troublesome and makes the code not easy to read.

Are there any more cleaner methods?

Thanks again.
Re: Possible to override Forms commit behaviour? [message #217211 is a reply to message #216996] Thu, 01 February 2007 03:32 Go to previous message
scorpio_biker
Messages: 154
Registered: November 2005
Location: Kent, England
Senior Member
I don't know if this will help but....

Assuming you are using a multi-record block and those are the rows you are talking about, you can use system.record_status to check the status of the record where the cursor is located (insert,changed,new,query). If you were to check this in the trigger used by the navigating key (your key_nxtrec for example) you could prompt for the save and then perform the trigger default action (as in next_record for example).
Previous Topic: Validation problem in Non-dataBase block
Next Topic: Query regarding a error
Goto Forum:
  


Current Time: Fri Dec 09 04:10:54 CST 2016

Total time taken to generate the page: 0.20110 seconds