Home » Developer & Programmer » Forms » difference between when-validate-item and post-change trigger
difference between when-validate-item and post-change trigger [message #131967] Wed, 10 August 2005 03:34 Go to next message
rareraja
Messages: 22
Registered: March 2005
Location: NJ, USA
Junior Member
hi,
can anyone knows what is the difference between WHEN-VALIDATE-ITEM and POST-CHANGE trugger ?


thanks in advance

raja
Re: difference between when-validate-item and post-change trigger [message #132002 is a reply to message #131967] Wed, 10 August 2005 06:51 Go to previous messageGo to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

The Post-Change trigger is included only for compatibility with previous versions of Form Builder. Its use is not recommended in new applications.

This is from Form's Help System:
Description

Fires when any of the following conditions exist:

n The Validate the Item process determines that an item is marked as Changed and is not NULL.

n An operator returns a value into an item by making a selection from a list of values, and the item is not NULL.

n Form Builder fetches a non-NULL value into an item. In this case, the When-Validate-Item trigger does not fire. If you want to circumvent this situation and effectively get rid of the Post-Change trigger, you must include a Post-Query trigger in addition to your When-Validate-Item trigger. See "Usage Notes" below.

Definition Level form, block, or item

Legal Commands

SELECT statements, unrestricted built-ins
Enter Query Mode no

Usage Notes

The Post-Change trigger is included only for compatibility with previous versions of Form Builder. Its use is not recommended in new applications.
The Post-Query trigger does not have the restrictions of the Post-Change trigger. You can use Post-Query to make changes to the fetched database values. Given such changes, Form Builder marks the corresponding items and records as changed.

On Failure

If fired as part of validation initiated by navigation, navigation fails, and the focus remains in the original item.

If there are V2-style triggers in the form and Form Builder is populating a record with fetched values, the following restrictions apply:

n Form Builder ignores any attempt to change the value of a database item in the record.

n Form Builder does not execute any SELECT statement that only affects database items in the record.

n Form Builder does not execute a SELECT statement that does not have an INTO clause.

n If Form Builder does not execute a SELECT statement in a V2-style trigger step, it treats the trigger step as though the step succeeded, even when the Reverse Return Code trigger step property is set.

During fetch processing, Post-Change triggers defined as PL/SQL triggers do not operate with these restrictions. Regardless of trigger style, during a record fetch, Form Builder does not perform validation checks, but marks the record and its items as Valid, after firing the Post-Change trigger for each item.

Fires In

Validate the Item
Fetch Records
Re: difference between when-validate-item and post-change trigger [message #132519 is a reply to message #131967] Sat, 13 August 2005 15:40 Go to previous message
oraclejo
Messages: 50
Registered: July 2005
Location: Ammar
Member
I am an old user of FORMS, really started in 1990 with Forms V2. At that time post-change was indispensible. It was used from two reason: 1) for validation during data entry, and 2) for populating lookup values during query.

This trigger became obsolete when the trigger when-validate-field was introduced way back when Form V3 saw the light again in 1990 1991.

the reson for it is obvious, i want to validate item while entry , but do not want to validate item during queries (Because they come from the database and as such already valid)

Currently, if you want to use when validate item to populate lookup values , you also have to write the same code to make sure that these non database lookup items are also populated during query and therefore, you need to write the POST-QUERY trigger


Ammar Sajdi

www.e-ammar.com

regards

Previous Topic: Fingerprint recognition??
Next Topic: can i call a canvas from canvas on the same form?
Goto Forum:
  


Current Time: Fri Sep 20 02:02:42 CDT 2024