Any Oracle Form that is stored as an operating system file has three values associated with it: the form filename, the form module name, and the form ID. The third value is invisible to the developer and can be obtained only by using Forms'supplied built-ins for that purpose. The first two seem to be closely related , but an in-depth analysis reveals that they are two entirely different values. This section exposes the theory hidden behind these three variables and presents tips to read and write their values.
The form filename is the actual operating system filename representing the binary .FMX. It can be obtained by using GET_APPLICATION_PROPERTY(CURRENT_FORM) or GET_FORM_PROPERTY(FILE_NAME).
The form module name is the name of the form module (which appears as the very first name under the Forms node in the Object Navigator), irrespective of whether the form is stored in the file system or database. This is obtained by GET_APPLICATION_PROPERTY(CURRENT_FORM_NAME) and GET_FORM_PROPERTY(FORM_NAME). The form system variables :SYSTEM.CURRENT_FORM and :SYSTEM.LAST_FORM also give the value of the form module name.
The form ID is an internal ID assigned to each form presently open (active or inactive) in a run-form session. This is of the composite data type FORMMODULE and can be obtained by using the FIND_FORM function. The parameter to be passed to this function can be one of the values specified in the preceding paragraph:
DECLARE form_id FORMMODULE; BEGIN form_id := FIND_FORM(NAME_IN('SYSTEM.CURRENT_FORM')); form_id := FIND_FORM(GET_APPLICATION_PROPERTY(CURRENT_FORM_NAME) END;
Also, the parameters for GO_FORM in an OPEN_FORM configuration can be either the form module name or form_id. I recommend using form_id because referencing by internal IDs saves an extra evaluation of the form_id each time the form is referenced.
Multiple instances of the same form result in different form IDs, even if the form module name is the same. This is because form_id is a composite structure that includes an id column ”meaning that each instance of the same form has a different form_id.id stored in it. The use of form_id.id is illustrated in the Form Management in an OPEN_FORM Configuration section later in this chapter.
Advanced GUI Development: Developing Beyond GUI
Advanced Forms Programming
Object-oriented Methods in Forms
Intelligence in Forms
Additional Interesting Techniques
Working with Trees
Oracle 8 and 8i Features in Forms Developer