A single function or pair of functions similar to $fieldname $entname which indicate the field the cursor currently occupies/would occupy if the struct editor were in force.

Use Case

Recent tests appear to point out that $fieldname and $entname do not indicate the current position of the cursor. Which I can understand for the use of some of the triggers. I need, however, to be able to tell which field the cursor was in for the instance during the form loses focus trigger (amongst others) to allow for a context sensitive control on another instance. This is not available, and the code therefore has to have extra code in the field gets focus trigger of all painted fields, storing the information in a component variable, forcing all fields to be detached from the model.




Proc Code

Operating System

Not Applicable



4 thoughts on “A function to indicate the field and entity which currently has the cursor”

  1. Hi Firesong

    What about a global procedure?

    Define in each component a component local variable e.g $INSTANCE_PROPERTIES$ (done by SQL by adding a row in UXREGS)


    In model include in each FGF-triger this code:

    Create a global proc like this:

    string v_PARA:INOUT ; Further extentions
    endparams  putitem/id $INSTANCE_PROPERTIES$,”LAST_FOCUS_FIELD”,$fieldname


    In FRGF-trigger code this

    Now you can get this information in FLGF-trigger

    [ FRGF and FRLF could calls to global procs too.  And you can insert this call into component UFRMDEF]

    With this simple code, you always know what’s going on 🙂



  2. Sort of, although, given the vaguaries determined in $entname and $fieldname, I’d prefer to go with including the compile time constants in the call to SF_FGF, so they are passed as fixed data.

    We do have some globally installed component variables.

    It just seems that it would be nice to know where the cursor is during proc….

  3. It’s null.

    I think it only returns a value if it’s been set by proc and not yet executed the cursor movement.

    According to the docs.

    Empty string (“”) if the default prompting sequence is in effect.

Leave a Reply