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.

NEXT_RECORD built-in<br />

Description<br />

Navigates to the first enabled and navigable item in the record with the next higher sequence number<br />

than the current record. If there is no such record, <strong>Form</strong> <strong>Builder</strong> will fetch or create a record. If the<br />

current record is a new record, NEXT_RECORD fails.<br />

Syntax<br />

PROCEDURE NEXT_RECORD;<br />

Built-in Type restricted procedure<br />

Enter Query Mode no<br />

Parameters<br />

none<br />

NEXT_RECORD restrictions<br />

Not allowed in Enter Query mode.<br />

NEXT_RECORD examples<br />

/*<br />

** Built-in: NEXT_RECORD<br />

** Example: If the current item is the last item in the<br />

** block, then skip to the next record instead of<br />

** the default of going back to the first item in<br />

** the same block<br />

** trigger: Key-Next-Item<br />

*/<br />

DECLARE<br />

cur_itm VARCHAR2(80) := :System.Cursor_Item;<br />

cur_blk VARCHAR2(80) := :System.Cursor_Block;<br />

lst_itm VARCHAR2(80);<br />

BEGIN<br />

lst_itm :=<br />

cur_blk||’.’||Get_Block_Property(cur_blk,LAST_ITEM);<br />

IF cur_itm = lst_itm THEN<br />

Next_Record;<br />

ELSE<br />

Next_Item;<br />

END IF;<br />

END;<br />

303

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

Saved successfully!

Ooh no, something went wrong!