getCurrentItem()
getCurrentItem() is used to retrieve the
name of the currently active form item:
LET dial = ui.Dialog.GetCurrent()
Parameters
takes no parameters
Possible values
depend on the location of the focus
- the
name of the action - if the program focus is on a button
or another item having the ACTION attribute;
- the
name of the current field given as [tab_name.]field_name - the tab_name prefix is added to the retrieved value if a FROM clause contains
an explicit list of fields. If the dialog uses FROM screen_record.* or
BY NAME structures, the prefix is omitted;
- the name of the screen array - if the program focus is in an active DISPLAY ARRAY
list;
- the identifier of the screen record given as screen_array.screen_record
- if the program focus is in the INPUT ARRAY list. In
some cases, the field name is left unidentified (e.g., in the BEFORE INPUT
block of an INPUT ARRAY statement)
There is some specifics about using variables with ui.Dialog methods.
You can learn about them here.
Example code
...
DEFINE id STRING
...
LET s = ui.Dialog.GetCurrent().getCurrentItem()
DISPLAY s
...