so, a WHEN-NEW-FORM-INSTANCE trigger fires , for example in a query form, once after each query is completed?
Main Topics
Browse All TopicsWHAT is the difference between WHEN-NEW-FORM-INSTANCE and PRE_FORM triggers?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
there a lot of differences if you dig into...
in pre-form trigger, restricted builtins cannot be used ( only sql stmts and unrestricted builtins can be used )
in when-new-form-instance trigger, restricted builtins can also be used along with sql statements and unrestricted builtins.
==========================
Use a PreForm trigger to perform the following tasks:
" assign unique primary key from sequence
" restrict access to a form
" initialize global variables
--------------------------
WhenNewFormInstance Trigger
At form startup, Oracle Forms navigates to the first navigable item in
the first navigable block. A WhenNewFormInstance trigger fires
after the successful completion of any navigational triggers that fire
during the initial navigation sequence.
This trigger does not fire when control returns to a calling form from a
called form.
In a multipleform application, this trigger does not fire when focus
changes from one form to another.
example for when-new-form-instance trigger :
This example sets up all necessary global variables, writes dynamic
boilerplate, starts a timer to refresh the onscreen clock, and queries the
first block.
BEGIN
Setup_My_Global_Variables;
Populate_Dynamic_Boilerpla
Start_OnScreen_Clock_Timer
Go_Block(Primary_Ord_Info
/*
** Query the block without showing
** the working message.
*/
:System.Suppress_Working := TRUE;
Execute_Query;
:System.Suppress_Working := FALSE;
END;
You can get this information from forms reference guide,
Thanks
So, in simple terms: the PRE-FORM trigger is much more limited in what it can do than the WHEN-NEW-FORM-INSTANCE trigger is. For example, if you want to automatically navigate to a particular block in a multi-block form and do a query there when the form starts, you have to use the WHEN-NEW-FORM-INSTANCE trigger for that.
Business Accounts
Answer for Membership
by: sujit_kumarPosted on 2007-07-12 at 09:07:38ID: 19473257
PRE-FORM is triggered pror to loading of the form. WHEN-NEW-FORM-INSTANCE is when the form is loading currently. So PRE-FORM trigger is always fired before WHEN-NEW-FORM-INSTANCE .