To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
The function fgl_getfieldname() returns the name of the currently active field, i.e., the name of the field in which the cursor is currently positioned. It requires no argument passed to it.
The function returns a CHAR(n) datatype value that is the name of the currently active field.
MAIN
DEFINE
rec1 RECORD
f1 char(20),
f2 char(20)
end record
OPEN WINDOW w1 WITH FORM "fgl_dialog_getfieldname_function"
INPUT BY NAME rec1.* WITHOUT DEFAULTS
ON KEY (F2)
IF INFIELD(F1) THEN
MESSAGE "Field: ", fgl_dialog_getfieldname()
END IF
IF INFIELD(F2) THEN
MESSAGE "Field: ", fgl_dialog_getfieldname()
END IF
END INPUT
CLOSE WINDOW w1
END MAIN
Example form code: fgl_dialog_getfieldname_function.per
DATABASE FORMONLY
SCREEN
{
[f1 ]
[f2 ]
}
ATTRIBUTES
f1=FORMONLY.f1;
f2=FORMONLY.f2;
INSTRUCTIONS
SCREEN RECORD s_rec (
FORMONLY.f1,
FORMONLY.f2
)
DELIMITERS "[]"
Field name is displayed in the message line if F2 pressed by the user.