Friday 23 January 2009

Trigger Firing sequence in D2K (Oracle Forms)

Trigger Firing sequence:This is most important thing to understand in Oracle D2K Forms When you open a form following triggers are executed

First Logon Triggers are fired1.PRE-LOGON
2.ON-LOGON
3.POST-LOGON

After that Pre Triggers4. PRE-FORM
5. PRE-BLOCK
6. PRE-TEXT

After that WHEN-NEW Triggers
7. WHEN-NEW-FORM-INSTANCE
8. WHEN-NEW-BLOCK-INSTANCE
9. WHEN-NEW-ITEM-INSTANCE

After that ITEM Level TriggersAfter this focus is on the first item of the Block. If you type some data and press the tab key following trigger will fire in sequence
10.KEY-NEXT-ITEM (This trigger is present on the item level).
11.POST-CHANGE (This trigger is present on the item level).
12.WHEN-VALIDATE-ITEM (This trigger is present on the item level).
13.POST-TEXT-ITEM (This trigger is present on the item level).
14.WHEN-NEW-ITEM-INSTANCE (Block Level Trigger).

Now focus will go the next item present on the form.
If there are no further items present on the screen them if we enter data and press tab key then only KEY-NEXT-ITEM is fired. Now suppose we close the form then the item level triggers are fired.

POST TRIGGERS

15.POST-BLOCK
16.POST-FORM

Now the form will be closed. My Profile

6 comments:

  1. 1 What is purpose and order of firing the following triggers
    - on fetch
    - on select
    First on-select then on-fetch trigger is fired .
    On-select is used to open and execute database query. on-fetch can be used in conjunction with on-select to replace the processing that normally occur in execute query built in procedure
    1)On select fires first.

    On select fFires when Forms Developer would normally execute the open cursor parse and execute phases of a query to identify

    ReplyDelete
  2. 12
    You can use the lexical parameters at From clause but you have to use lexical parameter as given below.

    SELECT 'last_name' client_last_name, 'first_name' client_first_name,
    'mailing_address1' mailing_address, 'city' city
    FROM dual
    WHERE 1=2
    &RGROUP1

    In above query I have used 2 lexical parameters and while calling the above report pass the &RGOUP1 values using the below statement.

    :RGROUP1 := 'UNION SELECT 'last_name' client_last_name, 'first_name'
    client_first_name, 'mailing_address1' mailing_address, 'city' city
    FROM emp_det'
    Using the above method you can generate the dynamic query in the report.



    Lexical references is used to runtime dynamic where conditions. If you create query through query builder colon(:) must be used and this is used in after parameter form.



    You can use the lexical parameters at From clause but you have to use lexical parameter as given below.


    SELECT 'last_name' client_last_name 'first_name' client_first_name
    'mailing_address1' mailing_address 'city' city

    FROM dual
    WHERE 1 2
    &RGROUP1

    In above query I have used 2 lexical parameters and while calling the above report pass the &RGOUP1 values using the below statement.

    :RGROUP1 : 'UNION
    SELECT 'last_name' client_last_name 'first_name'
    client_first_name 'mailing_address1' mailing_address 'city' city

    FROM emp_det'
    Using the above method you can generate the dynamic query in the report.



    12
    Scroll bar on tab pages
    Can we add scroll bar at on all tab pages in a single canvas? If yes then how:



    You can put a Stacked Canvas on Tab Pages. A Stack Canvas can have Scroll Bars. You Can hide and show the Stacked canvas according to requirements.


    12
    Open Form Example
    Give an example for open_form with parameter passing from one form to another form

    BEGIN
    CALL_FORM('FORM2'
    NO_HIDE
    DO_REPLACE -- replace menu
    NO_QUERY_ONLY
    SHARE_LIBRARY_DATA);
    END;

    look at the forms help for the differences between OPEN_FORM and CALL_FORM.

    ReplyDelete
  3. Thanks Suman for information provided.I will post these as articles.

    ReplyDelete
  4. If a user opens a form and after doing some transaction he closed the form. Then Write a sequence of from level trigger which will fire during opening and closing the form.

    ReplyDelete
  5. how to hide scroll bar when form is running

    ReplyDelete