Home » Developer & Programmer » Forms » Oracle Forms Triggers (Oracle Forms Builder 10g 10.1.2.0.2)
Oracle Forms Triggers [message #522768] Tue, 13 September 2011 10:13 Go to next message
ritaman
Messages: 10
Registered: September 2011
Location: Ireland
Junior Member
Hi

I am fairly new to Oracle forms and have the job of editing an existing form.

At the moment, I have a fairly standard Purchase Order form which contains pre-loaded data (been uploaded from an XML file).

When the Purchase Order is processed, the form updates a Price History table only if the Price on the PO_Details changes.

The code for updating the price history table is contained in a PRE_UPDATE trigger on the PO_Details Data Block.

No other data changes on the PO_Details table.

I now want to change this so that the Price History table is updated even if the price does not change i.e I want to create a history record for each record on the PO_Details irrespective of whether it was updated or not.

Is there an alternative trigger that I can move my code to (ie move it from PRE_UPDATE) to some other trigger that is fired for each PO_Details record even if there is no change.

Hope this makes sense.

Thanks in advance

[color removed]

[Updated on: Tue, 13 September 2011 13:03] by Moderator

Report message to a moderator

Re: Oracle Forms Triggers [message #522770 is a reply to message #522768] Tue, 13 September 2011 10:29 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
What kicks off the update of po_details in the first place?
Do the users manually change stuff in the block and click save?
Or is there a button that does stuff?
Re: Oracle Forms Triggers [message #522844 is a reply to message #522770] Wed, 14 September 2011 02:58 Go to previous messageGo to next message
ritaman
Messages: 10
Registered: September 2011
Location: Ireland
Junior Member
Thank you for your reply.
A price is automatically populated but the user has an option of changing the price on one or more rowss and clicking a 'Process' button.
I am thinking that I may need to add code into a POST_FORMS_COMMIT trigger.
Re: Oracle Forms Triggers [message #522847 is a reply to message #522844] Wed, 14 September 2011 03:48 Go to previous messageGo to next message
cookiemonster
Messages: 13937
Registered: September 2008
Location: Rainy Manchester
Senior Member
Why not put the code in the process button?
Re: Oracle Forms Triggers [message #522873 is a reply to message #522847] Wed, 14 September 2011 05:27 Go to previous message
ritaman
Messages: 10
Registered: September 2011
Location: Ireland
Junior Member
Thanks - I will try that. I may be back to you for help on this. Thanks again
Previous Topic: Highlisght a particular record
Next Topic: Need to clear the form and execute a procedure in same trigger
Goto Forum:
  


Current Time: Sat Sep 07 12:54:52 CDT 2024