11.01.2013 Views

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

Oracle Forms Developer – Form Builder Reference, Volume 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VALIDATE built-in<br />

Description<br />

VALIDATE forces <strong>Form</strong> <strong>Builder</strong> to immediately execute validation processing for the indicated<br />

validation scope.<br />

Syntax<br />

VALIDATE<br />

(validation_scope NUMBER);<br />

Built-in Type:<br />

unrestricted procedure<br />

Enter Query Mode yes<br />

Parameters<br />

validation scope Specify one of the following scopes:<br />

Note on runtime behavior<br />

DEFAULT_SCOPE Perform normal validation for the default scope,<br />

determined by the runtime platform.<br />

Note: If you change the scope via<br />

SET_FORM_PROPERTY(VALIDATION UNIT) and then call<br />

VALIDATE(DEFAULT_SCOPE), you will override the default scope as<br />

defined in the form module. In this case, <strong>Form</strong> <strong>Builder</strong> will not validate at<br />

the default scope but at the scope defined by SET_FORM_PROPERTY.<br />

FORM_SCOPE Perform normal validation for the current form.<br />

BLOCK_SCOPE Perform normal validation for the current block.<br />

RECORD_SCOPE Perform normal validation for the current record.<br />

ITEM_SCOPE Perform normal validation for the current item.<br />

If an invalid field is detected when validation is performed, the cursor does not move to that field.<br />

Instead, the cursor remains in its previous position.<br />

VALIDATE examples<br />

/*<br />

** Built-in: VALIDATE<br />

** Example: Deposits the primary key value, which the user<br />

** has typed, into a global variable, and then<br />

** validates the current block.<br />

** trigger: When-New-Item-Instance<br />

*/<br />

BEGIN<br />

IF :Emp.Empno IS NOT NULL THEN<br />

:Global.Employee_Id := :Emp.Empno;<br />

Validate(block_scope);<br />

451

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!