How to Check First and Last Record in Oracle Forms?

How to Check First and Last Record in Oracle Forms?

In Oracle Forms, to check for the first record use System.Cursor_Record system variable and to check for the last record use System.Last_Record system variable. Below are the examples:

Check If First Record in Oracle Forms

System.Cursor_Record return the current number of record in Oracle Forms in char. Suppose you have a tabular database block, in which you have multiple records then use System.Cursor_Record to determine the current record number. Below is an example of determining the first record:

BEGIN
   IF :SYSTEM.Cursor_Record = '1'
   THEN
      MESSAGE ('At first record.');
   END IF;
END;

Check If the Last Record in Oracle Forms

Use System.Last_Record to check if the last record. System.Last_Record returns the char value TRUE or FALSE. Below is an example:

BEGIN
   IF :SYSTEM.LAST_RECORD = 'TRUE'
   THEN
      MESSAGE ('At last record.');
   END IF;
END;

See also:

  • Populating Tabular Data Block Manually Using Cursor in Oracle Forms
  • Moving From Top To Bottom in Detailed Block in Oracle Forms