scr_line()

Returns the index of the current row in the form screen array.

Syntax

FUNCTION scr_line()
  RETURNS INTEGER

Usage

The scr_line() function returns the index of the current row in the current screen array of the form. It is typically used inside a DISPLAY ARRAY or INPUT ARRAY statement, especially in TUI mode.

Do not confuse scr_line() with arr_curr(); the first returns the index of the current row in the form screen array, and the second returns the index of the current row in the program variable.

Important:

With new graphical objects such as TABLE container, the scr_line() function can return a screen array line number outside the visible page of rows, because the current row may not be in the visibile rows when scrolling the list. Consequently, legacy code relying on scr_line() to display data in specific screen array lines can fail. For TUI applications, the code can be left untouched. For GUI applications, consider using DIALOG.getCurrentRow() or arr_curr(), with the UNBUFFERED mode.