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.
This example retrieves descriptions for code fields, for display in non-database items in the current block.
CURSOR lookup_payplan IS SELECT Payplan_Desc
WHERE Payplan_Id =
CURSOR lookup_area IS SELECT Area_Name
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.
FETCH lookup_payplan INTO :Employee.Payplan_Desc_Nondb;
Lookup Area Descript given the Zipcode in the Employee Record just fetched. Use Explicit Cursor for highest efficiency.
FETCH lookup_area INTO :Employee.Area_Desc_Nondb;
- An Example of Pre-Query and Post-Query Triggers in Oracle Forms With Using Display_Item to Highlight Dynamically
- Populating Tabular Data Block Manually Using Cursor in Oracle Forms
- If Value Exists Then Query Else Allow Create New in Oracle Forms An Example
- Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle Forms
- An Example of On-Error Trigger in Oracle Forms
- Pre-Update and Pre-Insert Trigger Examples For Oracle Forms