CLEAR_FORM Built-in
Description
Causes Oracle Forms to remove all records from, or flush, the current form, and puts the input focus in the first item of the first block.
Syntax
PROCEDURE CLEAR_FORM;
PROCEDURE CLEAR_FORM
(commit_mode NUMBER);
PROCEDURE CLEAR_FORM
(commit_mode NUMBER,
rollback_mode NUMBER);
Built-in Type restricted procedure
Enter Query Mode no
Parameters
If the end user has made changes to records in the current form or any called form, and those records have not been posted or committed, Oracle Forms processes the records, following the directions indicated by the argument supplied for the following parameter:
- commit_mode
-
- ASK_COMMIT Oracle Forms prompts the end user to commit
the changes during CLEAR_FORM processing.
DO_COMMIT Oracle Forms validates the changes,
performs a commit, and flushes the current form without prompting the end
user.
NO_COMMIT Oracle Forms validates the changes
and flushes the current form without performing a commit or prompting the
end user.
NO_VALIDATE Oracle Forms flushes the current
form without validating the changes, committing the changes, or prompting
the end user.
-
- rollback_mode
-
- TO_SAVEPOINT Oracle Forms rolls back all uncommitted
changes (including posted changes) to the current form's savepoint.
FULL_ROLLBACK Oracle Forms rolls back all uncommitted
changes (including posted changes) which 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 prevent
losing the locks issued by the calling form, Oracle Forms prevents any
commit processing in the called form.)
CLEAR_FORM Restrictions
If you use a PL/SQL ROLLBACK statement in an anonymous block or a user-defined subprogram, Oracle Forms interprets that statement as a CLEAR_FORM Built-in subprogram with no parameters.
CLEAR_FORM Example
/*
** Built-in: CLEAR_FORM
** Example: Clear any changes made in the current form,
** without prompting to commit.
*/
BEGIN
Clear
_Form(No_Validate);
END;