ui.Dialog.getCurrentItem
Returns the current item having focus.
Syntax
getCurrentItem()
RETURNS STRING
Usage
The getCurrentItem() method returns the name of the current form item having the
focus, or the last triggered MENU action.
When the dialog is a MENU,
getCurrentItem() returns the name of the last triggered action, no matter the type
of action handler (COMMAND, COMMAND KEY or ON
ACTION).
For all kind of dialogs except MENU,
when the focus is on an action view (typically, a BUTTON in the form layout), getCurrentItem() returns the
name of the corresponding action. If several action views are bound to the same action handler with
a unique name, there is no way to distinguish which action view has the focus.
If the focus is in a simple field controlled by an INPUT or CONSTRUCT singular- or sub-dialog, getCurrentItem()
returns the [table-name.]field-name of that current field. The
table-name prefix is added if a FROM clause is used with an
explicit list of fields. No prefix is added if FROM screen-record.* is used or if
BY NAME clause is used. In the context of a BEFORE INPUT or
BEFORE CONSTRUCT block, the getCurrentItem() method always returns
NULL.
If the focus is in a list controlled by a DISPLAY ARRAY singular- or sub-dialog, getCurrentItem()
returns the screen-array name identifying the list for a regular DISPLAY
ARRAY. If the DISPLAY ARRAY is defined with the
FOCUSONFIELD attribute, the method returns
screen-array.field-name. In some context, the current field is undefined. For
example when entering the DISPLAY ARRAY, getCurrentItem() will
only return the screen-array, in the context of the BEFORE ROW
control block.
If the focus is in a field of a list controlled by an INPUT ARRAY singular- or
sub-dialog, getCurrentItem() returns screen-array.field-name,
identifying both the list and the current field. In some context, the current field is undefined.
For example when entering the INPUT ARRAY, getCurrentItem() will
only return the screen-array, in the context of the BEFORE ROW
control block. In the context of a BEFORE INPUT or BEFORE
CONSTRUCT block, the getCurrentItem() method always returns
NULL.