Press "Enter" to skip to content

Using Post_Query Trigger in Oracle Forms

When a query is open in the block, the Post-Query trigger fires each time Form Builder fetches a record into a block. The trigger fires once for each record placed on the block’s list of records.

Usage Notes
Use a Post-Query trigger to perform the following tasks:
·  populate control items or items in other blocks
·  calculate statistics about the records retrieved by a query
·  calculate a running total
·  When you use a Post-Query trigger to SELECT non-base table values into control items, Form Builder marks each record as CHANGED, and so fires the When-Validate-Item trigger by default. You can avoid the execution of the When-Validate-Item trigger by explicitly setting the Status property of each record to  QUERY in the Post-Query trigger. To set record status programmatically, use SET_RECORD_PROPERTY.

See also:
This example retrieves descriptions for code fields, for display in non-database items in the current block.
CURSOR lookup_payplan IS SELECT Payplan_Desc
FROM Payplan
WHERE Payplan_Id =
CURSOR lookup_area IS SELECT Area_Name
FROM Zip_Code
WHERE Zip = :Employee.Zip;
Lookup the Payment Plan Description given the Payplan_Id in the Employee Record just fetched. Use Explicit Cursor for highest efficiency.
OPEN lookup_payplan;
FETCH lookup_payplan INTO :Employee.Payplan_Desc_Nondb;
CLOSE lookup_payplan;
Lookup Area Descript given the Zipcode in the Employee Record just fetched. Use Explicit Cursor for highest efficiency.
OPEN lookup_area;
FETCH lookup_area INTO :Employee.Area_Desc_Nondb;
CLOSE lookup_area;

Vinish Kapoor is created, written, and maintained by Vinish Kapoor. It is built on WordPress, and hosted by Bluehost. Connect with Vinish on Facebook, Twitter, and GitHub.

You may also like: