Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month! GetIt Reference Guide - syntax: n_gotoget(<getn>|<variablec>) [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Syntax: N_GOTOGET(<getN>|<variableC>)

Move cursor to specified input field.


N_GOTOGET(N_GETNO()-1)        && move back one field
N_GOTOGET(N_LASTGET())        && move to last field on screen
N_GOTOGET(1)                  && goto first input field
N_GOTOGET("Mssno")            && move to SSno field


If an invalid Get is specified or if no Gets are active then no action is

Use Within Valid Functions

Clipper moves the cursor to the next Get (or prior Get, depending on the key
pressed) after returning True from a Valid function.   You must keep this in
mind when using N_GOTOGET from inside a Valid function.

     LASTKEY()                          Cursor moves to
     13 (Enter)                         Next Get
     24 (.)                             Next Get
      5 (.)                             Prior Get
     >= 32 (displayable character)      Next Get (Confirm Off only)

The following UDF can be used inside a Valid Function to make sure that the
cursor actually moves to the correct Get.

     FUNCTION  goto_get
     PARAMETER Mget                && name or number
     PRIVATE Mgetno
     * Change to number if name
     Mgetno = IF(TYPE("Mget") = "C",N_GETNO(Mget),Mget)
     N_GOTOGET(IF(LASTKEY() = 5,Mgetno+1,Mgetno-1))

No special considereration is needed when using N_GOTOGET inside a SET KEY
procedure, a HELP procedure, or when returning False from a Valid function.


Online resources provided by: --- NG 2 HTML conversion by Dave Pearson