Oracle Forms : Form Level Property : First Navigation Data Block



Oracle Forms Online Help says: Specifies the name of the block to which Oracle Forms should navigate at form startup and after a CLEAR_FORM operation. By default, the First Navigation Block is the first block in the form's commit sequence, as indicated by the sequence of blocks in the Object Navigator. You can set the First Navigation Block property programmatically to specify a different block as the first navigation block.




Before understanding this property, let us check a case. We have a form with 2 blocks. Let’s name it Dummy and Main. In the data block hierarchy, Main block is placed after Dummy block. Each blocks have 2 items (Code and Name).
Place these items on the canvas by setting its canvas property.



Now run this form.



You can see that the cursor is placed in first item of Dummy Block i.e., Code as per data block hierarchy.



Now you have a requirement to place the cursor in item Code of Main block. Then we have different ways:-
1.       Change the hierarchy of blocks. 


2.       If you do not wish to change the hierarchy, write the form level WHEN-NEW-FORM-INSTANCE trigger and write code to send to the block ‘Main’. 


3.       If you do not wish to do any of above two then, you have the Form Level property “First Navigation Data Block”. 


4.       If you wish to set “First Navigation Data Block” programmatically, use Pre-Form trigger and Set_Form_Property function. 



Default: “The first block in the form; that is, the block that is listed first in the Object Navigator (within data block hierarchy).”


Usage Notes: You can set this property from a Pre-Form trigger, which fires at form startup, before Oracle Forms navigates internally to the first block in the form.

Post a Comment

1 Comments