A script-enabled browser is required for this page to function properly.

NEW_FORM Built-in

Description

Exits the current form and enters the indicated form. The calling form is terminated as the parent form. If the calling form had been called by a higher form, Oracle Forms keeps the higher call active and treats it as a call to the new form. Oracle Forms releases memory (such as database cursors) that the terminated form was using.

Oracle Forms runs the new form with the same Runform options as the parent form. If the parent form was a called form, Oracle Forms runs the new form with the same options as the parent form.

Syntax

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER,
data_mode NUMBER);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER,
paramlist_id
PARAMLIST);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER,
paramlist_name
VARCHAR2);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER,
data_mode
NUMBER,
paramlist_id
PARAMLIST);

PROCEDURE NEW_FORM
(formmodule_name VARCHAR2,
rollback_mode
NUMBER,
query_mode
NUMBER,
data_mode
NUMBER,
paramlist_name
VARCHAR2);

Built-in Type restricted procedure

Enter Query Mode no

Parameters

formmodule_name 
 
Then name of the called form (must be enclosed in single quotes). Datatype is VARCHAR2.
 
rollback_mode
 
 TO_SAVEPOINT (The default.) Oracle Forms will roll back all uncommitted changes (including posted changes) to the current form's savepoint.

NO_ROLLBACK Oracle Forms will exit the current form without rolling back to a savepoint. You can leave the top level form without performing a rollback, which means that you retain any locks across a NEW_FORM operation. These locks can also occur when invoking Oracle Forms from an external 3GL program. The locks are still in effect when you regain control from Oracle Forms.

FULL_ROLLBACK Oracle Forms rolls back all uncommitted changes (including posted changes) that were made during the current Runform session. You cannot specify a FULL_ROLLBACK from a form that is running in post-only mode. (Post-only mode can occur when your form issues a call to another form while unposted records exist in the calling form. To avoid losing the locks issued by the calling form, Oracle Forms prevents any commit processing in the called form.)
 
query_mode 
 
NO_QUERY_ONLY (The default.) Runs the indicated form normally, allowing the end user to perform inserts, updates, and deletes in the form.

QUERY_ONLY Runs the indicated form in query-only mode; end users can query records, but cannot perform inserts, updates or deletes.
 
data_mode 
 
NO_SHARE_LIBRARY_DATA (The default.) At runtime, Oracle Forms will not share data between forms that have identical libraries attached (at design time).

SHARE_LIBRARY_DATA At runtime, Oracle Forms will share data between forms that have identical libraries attached (at design time).
 
paramlist_id 
 
The unique ID Oracle Forms assigns when it creates the parameter list. Specify a parameter list when you want to pass parameters from the calling form to the new form. Datatype is PARAMLIST. A parameter list passed to a form via NEW_FORM cannot contain parameters of type DATA_PARAMETER (a pointer to record group).
 
paramlist_name 
 
The name you gave the parameter list object when you defined it. Datatype is VARCHAR2. A parameter list passed to a form via NEW_FORM cannot contain parameters of type DATA_PARAMETER (a pointer to record group).

NEW_FORM Examples

/* Create a generic procedure that will invoke the

** formname passed-in using the method indicated by
** the 'newform' and 'queryonly' parameters.
*/
PROCEDURE GENERIC_CALL(formname VARCHAR2,
newform VARCHAR2,
queryonly VARCHAR2) IS

msglvl VARCHAR2(2);
error_occurred EXCEPTION;
BEGIN
/*
** Remember the current message level and temporarily
** set it to 10 to suppress errors if an incorrect
** formname is called
*/
msglvl := :SYSTEM.MESSAGE_LEVEL;
:SYSTEM.MESSAGE_LEVEL := '10';

IF newform = 'Y' THEN
IF queryonly = 'Y' THEN
NEW_FORM(formname, to_savepoint, query_only);
ELSIF queryonly = 'N' THEN
NEW_FORM(formname);
END IF;
ELSIF newform = 'N' THEN
IF queryonly = 'Y' THEN
CALL_FORM(formname, hide, no_replace, query_only);
ELSIF queryonly = 'N' THEN
CALL_FORM(formname);
END IF;
END IF;
IF NOT form_success THEN
MESSAGE('Cannot call form '||UPPER(formname)||
'. Please contact your SysAdmin for help.');
RAISE error_occurred;
END IF;
:SYSTEM.MESSAGE_LEVEL := msglvl;
EXCEPTION
WHEN error_occurred THEN
:SYSTEM.MESSAGE_LEVEL := msglvl;
RAISE form_trigger_failure;
END;