determining the field name

ss_kiran

Member
Hello Everybody,
is there any way by which i can trap the field name of the field on which my cursor is OR currently highlighted.
i have a code which looks something like this:

Def temp-table tt-all-forms
field tt-t1 as character
field tt-t2 as character
field tt-t3 as character... and so on
and in the same code i have a procedure where in i want to find out the name of the field which is in focus or my cursor is on.

all the temp-table variables are part of the FORM which is the GUI interface.

Thanks
Kiran
 

Dan Dragut

New Member
Hi Kiran,

What do you say about making a function which returns the focus name, like this:

Code:
FUNCTION GetFocusName RETURNS CHARACTER ():
   IF CAN-QUERY (FOCUS, "NAME") THEN RETURN FOCUS:NAME.
                                ELSE RETURN "?".
END.


ON 'CTRL-F1':U ANYWHERE
DO:
   MESSAGE GetFocusName ().
END.

You can do that the same way for accessing, for example, the table name or anything you like to.

HTH, :up:
Dan
 
Top