fgl_set_arr_curr()
Moves to a specific row in a record list.
Syntax
fgl_set_arr_curr(
row INTEGER )
- row is the row number is the program array variable.
Usage
This function is used to control navigation in a DISPLAY ARRAY
or INPUT
ARRAY
, within an ON ACTION
or ON KEY
block. The function
can also be used inside BEFORE DISPLAY
or BEFORE INPUT
blocks, to
jump to a specific row when the dialog starts. It is not recommended to use this function in an
other context.
Control blocks like BEFORE ROW
and field/row validation in INPUT
ARRAY
are executed, as if the user moved to another row, except when the function is called
in BEFORE DISPLAY
or BEFORE INPUT
.
When a new row is reached using this function, the first editable field gets the focus.
Since fgl_set_arr_curr()
triggers control blocks, this can make the dialog more
difficult to implement, as it chains several dialog blocks executing additional code which can in
turn again call this function, resulting in an infinite loop. To set the current row from the
program code, consider using DIALOG.setCurrentRow()
instead of fgl_set_arr_curr()
, to
avoid the implicit execution of control blocks.