Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference bw when_validate_item and key_next_item triggers in forms

Status
Not open for further replies.

shailu77

Programmer
May 5, 2003
7
0
0
IR
Hi,,

I was wondering if anyone could explain me the difference between when_validate_item trigger and key_next_item trigger in Oracle Forms.

THanks
shailu
 
WHEN-VALIDATE-ITEM trigger fires to check the value of an item to insure it is valid. The timing of this event may vary but one of the most common is when the user enters a value and causes the cursor to try to exit the item by pressing the TAB key or using the mouse to click elsewhere in the form. This trigger can also fire when then user attempts to leave a record that has been marked for insertion or change.

KEY-NEXT-ITEM fires only when the user presses the TAB key.


[sup]Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
 
BJCooperIT : I can not agree with you regarding TAB key, because it may depend on Terminal file. Thus in general it may be any dedicated key.

Regards, Dima
 
You should also note that WHEN-VALIDATE-ITEM trigger is a restricted procedure, so you cannot use navigation built-ins (such as GO_BLOCK). There are no such restrictions with KEY-NEXT-ITEM.
 
Dima:
You are right, of course. What I should have said was a more generic "pressing a key".

Lewisp:
Good point. I was only thinking about the common newbie mistake of putting validation code in KEY-NEXT-ITEM.


[sup]Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw[/sup]
Consultant/Custom Forms & PL/SQL - Oracle 8.1.7 - Windows 2000
[sup]When posting code, please use TGML to help readability. Thanks![sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top