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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SYSTEM.MODE system variable<br />

Syntax<br />

SYSTEM.MODE<br />

Description<br />

SYSTEM.MODE indicates whether the form is in Normal, Enter Query, or Fetch Processing mode. The<br />

value is always a character string.<br />

Usage Notes<br />

398<br />

NORMAL Indicates that the form is currently in normal processing mode.<br />

ENTER-QUERY Indicates that the form is currently in Enter Query mode.<br />

QUERY Indicates that the form is currently in fetch processing mode,<br />

meaning that a query is currently being processed.<br />

When using SYSTEM.MODE to check whether the current block is in Enter Query mode, be aware that<br />

if testing from a When-Button-Pressed trigger in a control block, Enter Query mode will never be<br />

entered, because the control block is not the current block.<br />

SYSTEM.MODE examples<br />

Assume that you want <strong>Form</strong> <strong>Builder</strong> to display an LOV when the operator enters query mode and the<br />

input focus is in a particular text item. The following trigger accomplishes that operation.<br />

/*<br />

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

*/<br />

BEGIN<br />

IF :System.Cursor_Item = ’EMP.EMPNO’ and<br />

:System.Mode = ’ENTER-QUERY’<br />

THEN<br />

IF NOT Show_Lov(’my_lov’) THEN<br />

RAISE <strong>Form</strong>_trigger_Failure;<br />

END IF;<br />

END;

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

Saved successfully!

Ooh no, something went wrong!