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.

FORM_FAILURE built-in<br />

Description<br />

Returns a value that indicates the outcome of the action most recently performed during the current<br />

Runform session.<br />

Outcome Returned Value<br />

success FALSE<br />

failure TRUE<br />

fatal error FALSE<br />

144<br />

If no action has executed in the current Runform session, FORM_FAILURE returns FALSE.<br />

Use FORM_FAILURE to test the outcome of a built-in to determine further processing within any<br />

trigger. To get the correct results, you must perform the test immediately after the action executes. That<br />

is, another action should not occur prior to the test.<br />

Note: "Another action" includes both built-ins and PL/SQL assignment statements. If another action<br />

occurs, FORM_FAILURE may not reflect the status of the built-in you are testing, but of the other,<br />

more recently executed action. A more accurate technique is, for example, when performing a<br />

COMMIT_FORM, to check that the SYSTEM.FORM_STATUS variable is set to ’QUERY’ after the<br />

operation is done.<br />

Syntax<br />

FUNCTION FORM_FAILURE;<br />

Built-in Type unrestricted function<br />

Returns BOOLEAN<br />

Enter Query Mode yes<br />

Parameters<br />

none<br />

FORM_FAILURE examples<br />

/*<br />

** Built-in: FORM_FAILURE<br />

** Example: Determine if the most recently executed built-in<br />

** failed.<br />

*/<br />

BEGIN<br />

GO_BLOCK(’Success_Factor’);<br />

/*<br />

** If some validation failed and prevented us from leaving<br />

** the current block, then stop executing this trigger.

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

Saved successfully!

Ooh no, something went wrong!