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:
http://www.foxinfotech.in/2013/02/populating-display-item-value-on-query.html
http://www.foxinfotech.in/2014/02/pre-query-post-query-displayitem-oracle-forms.html
Example
This example retrieves descriptions for code fields, for display in non-database items in the current block.
DECLARE
CURSOR lookup_payplan IS SELECT Payplan_Desc
FROM Payplan
WHERE Payplan_Id =
:Employee.Payplan_Id;
CURSOR lookup_area IS SELECT Area_Name
FROM Zip_Code
WHERE Zip = :Employee.Zip;
BEGIN
/*
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;
END;

时间: 2024-10-16 12:53:03

Using Post_Query Trigger in Oracle Forms的相关文章

An Example of On-Error Trigger in Oracle Forms

I wrote this trigger around 4 years ago to handle errors in an application based on Oracle Forms 6i. This trigger handles all errors with some custom messages for some specific errors and not only this after giving an appropriate message to the user

Writing On-Error Trigger In Oracle Forms

Suppose you want to handle an error in oracle forms and want to display custom error message for that error, but also you want to customize more for a particular error. For example there are many fields in form with required property is set to TRUE f

Learn How To Create Trigger In Oracle Forms

I have written many posts related to triggers in Oracle Forms, I have given examples for Form Level triggers, Data Block Level triggers and Item Level Triggers. And in this tutorial I am just giving the simple tutorial to how to create a trigger in O

Define Custom Data Filter Using Pre-Query Trigger In Oracle Forms

Oracle Forms is having its default records filter, which we can use through Enter Query mode to specify some search criteria or to filter records before display, but you can also create your own filter, which can be more user friendly and easy to use

How to Log Users Login and Logout Details Through Oracle Forms

Log user's login and logout details in to table through Oracle Forms using POST-LOGON and PRE-LOGOUT triggers to track the user's login and logout activity for auditing purposes. In this example one table and a sequence object is used to log the data

Pre-Query trigger in Oracle D2k / Oracle Forms

Pre-Query trigger in Oracle D2k / Oracle Forms DescriptionFires during Execute Query or Count Query processing, just before Form Builder constructs and issuesthe SELECT statement to identify rows that match the query criteria.Definition Level form or

Pre-Update and Pre-Insert Trigger Examples For Oracle Forms

See also: Why And When To Use Pre-Update and Pre-Insert Triggers In Oracle Forms Pre-Update Fires during the Post and CommitTransactions process, before a row is updated in Oracle Forms. It fires once for each record that is marked for update. The fo

Determining Current Block and Current Item in Oracle Forms

SYSTEM.CURSOR_BLOCK Determining current block in Oracle Forms Using SYSTEM.CURSOR_BLOCK system variable. The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current navigation unit:If the current navigation unit is the bl

Create Hierarchical Tree To Control Records In Oracle Forms

Download Source Code Providing an example form for creating hierarchical trees in Oracle Forms to control data block records. In this form whenever user selects any node in tree menu then corresponding record is displayed at right side. This form is