CLEAR_BLOCK Built-in
Description
Causes Forms Developer to remove all records
from, or "flush," the current block.
Syntax
PROCEDURE CLEAR_BLOCK;
PROCEDURE CLEAR_BLOCK
(commit_mode NUMBER);
Built-in Type restricted
procedure
Enter Query Mode no
Parameters
If the end user has made changes to records in
the current block that have not been posted or committed, Forms Developer
processes the records, following the directions indicated by the argument
supplied for the commit_mode parameter:
commit_mode
The optional
action parameter takes the following possible constants as arguments:
ASK_COMMIT
Forms Developer prompts the end user to commit
the changes during CLEAR_BLOCK processing.
DO_COMMIT
Forms Developer validates the changes, performs
a commit, and flushes the current block without prompting the end user.
NO_COMMIT
Forms Developer validates the changes and
flushes the current block without performing a commit or prompting the end
user.
Forms Developer flushes the current block
without validating the changes, committing the changes, or prompting the end
user.
CLEAR_BLOCK Examples
**
Built-in: CLEAR_BLOCK
**
Example: Clears the
current block without validation, and
**
deposits the primary key
value which the user
**
has typed into a global
variable which a
**
Pre-Query trigger will use
to include it as a
**
query criterion.
**
Trigger:
When-New-Item-Instance
*/
BEGIN
IF :Emp.Empno IS NOT NULL THEN :Global.Employee_Id
:= :Emp.Empno; Clear_Block(No_Validate);
END IF;
END;
/*
** Trigger: Pre-Query */
BEGIN
Default_Value(NULL, 'Global.Employee_Id'); IF
:Global.Employee_Id IS NOT NULL THEN :Emp.Empno := :Global.Employee_Id;
END IF;
END;
No comments:
Post a Comment