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.CURSOR_BLOCK system variable<br />

Syntax<br />

SYSTEM.CURSOR_BLOCK<br />

Description<br />

The value that the SYSTEM.CURSOR_BLOCK system variable represents depends on the current<br />

navigation unit:<br />

• If the current navigation unit is the block, record, or item (as in the Pre- and Post- Item, Record, and<br />

Block triggers), the value of SYSTEM.CURSOR_BLOCK is the name of the block where the cursor<br />

is located. The value is always a character string.<br />

• If the current navigation unit is the form (as in the Pre- and Post-<strong>Form</strong> triggers), the value of<br />

SYSTEM.CURSOR_BLOCK is NULL.<br />

SYSTEM.CURSOR_BLOCK examples<br />

Assume that you want to create a Key-NXTBLK trigger at the form level that navigates depending on<br />

what the current block is. The following trigger performs this function, using<br />

:SYSTEM.CURSOR_BLOCK stored in a local variable.<br />

DECLARE<br />

curblk VARCHAR2(30);<br />

BEGIN<br />

curblk := :System.Cursor_Block;<br />

IF curblk = ’ORDERS’<br />

THEN Go_Block(’ITEMS’);<br />

ELSIF curblk = ’ITEMS’<br />

THEN Go_Block(’CUSTOMERS’);<br />

ELSIF curblk = ’CUSTOMERS’<br />

THEN Go_Block(’ORDERS’);<br />

END IF;<br />

END;<br />

382

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

Saved successfully!

Ooh no, something went wrong!