Home » Developer & Programmer » Forms » Need trigger
Need trigger [message #658723] Sat, 24 December 2016 00:47 Go to next message
TOFARHAN
Messages: 19
Registered: June 2011
Location: farisalabad
Junior Member
Dears,
In my form I create a text box that sum the amount. This sum is conditional. if your select type item then sum of these item. I show the result when he commit form or query the form. I write two trigger to achieve this result.
1) post_commit_form
2) post_query.
I need one trigger to achieve this result.

Regards,

Farhan.
Re: Need trigger [message #658737 is a reply to message #658723] Sun, 25 December 2016 01:33 Go to previous message
Littlefoot
Messages: 21678
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Option I wouldn't recommend is to create a KEY-COMMIT trigger which would commit and EXECUTE-QUERY; that would fire POST-QUERY and run your code. However, as you can commit without KEY-COMMIT triggee, that is a bad solutuon.

Another one is to calculate sum in WHEN-VALIDATE-ITEM (or -RECORD?) trigger (so that you don't have to wait for commit to see the result), but you still need POST-QUERY.

Or, put your code into a procedure so that you don't have to maintain it in two triggers, and then call the procedure whenever needed.

A conclusion? In my opinion, you'll need 2 triggers anyway.
Previous Topic: Send Mail using SMTP through microsoft office 365 in oracle
Next Topic: Get List of Visual Attribute NAMES on a Form
Goto Forum:
  


Current Time: Fri Jun 25 05:56:34 CDT 2021