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.

SYSTEM.CURSOR_ITEM system variable<br />

Syntax<br />

SYSTEM.CURSOR_ITEM<br />

Description<br />

SYSTEM.CURSOR_ITEM represents the name of the block and item, block.item, where the input focus<br />

(cursor) is located.<br />

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

Usage Notes<br />

Within a given trigger, the value of SYSTEM.CURSOR_ITEM changes when navigation takes place.<br />

This differs from SYSTEM.TRIGGER_ITEM, which remains the same from the beginning to the end of<br />

single trigger.<br />

SYSTEM.CURSOR_ITEM restrictions<br />

Avoid using SYSTEM.CURSOR_ITEM in triggers where the current navigation unit is not the item,<br />

such as Pre- and Post-Record, Block, and <strong>Form</strong> triggers. In these triggers, the value of<br />

SYSTEM.CURSOR_ITEM is NULL.<br />

SYSTEM.CURSOR_ITEM examples<br />

Assume that you want to create a user-defined procedure that takes the value of the item where the cursor<br />

is located (represented by SYSTEM.CURSOR_VALUE), then multiplies the value by a constant, and<br />

then reads the modified value into the same item. The following user-defined procedure uses the COPY<br />

built-in to perform this function.<br />

PROCEDURE CALC_VALUE IS<br />

new_value NUMBER;<br />

BEGIN<br />

new_value := TO_NUMBER(:System.Cursor_Value) * .06;<br />

Copy(TO_CHAR(new_value), :System.Cursor_Item);<br />

END;<br />

383

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

Saved successfully!

Ooh no, something went wrong!