QTIPS - Positioning Cursors in AMV fields

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 OCT 19912.1+EXPERTWINDOW_COMMON%, WC_AMV_ACTION%, WC_WI_NEXT%, WC_MV_NEXT%

Mike Nourse of MN2 generously points out that it can sometimes be desirable to position the input cursor on a specific row/prompt intersection in an AMV after altering the contents of the AMV. Unfortunately, setting WC_AMV_ACTION% to 4 (to redisplay the contents), always sets WC_MV_NEXT% back to 1, resulting in the cursor returning to line 1 of the AMV.

Mike points out that putting an "@" in front of WC_MV_NEXT% instructs the window processor to leave WC_MV_NEXT% alone during a reset rather than setting it to 1. Thus, on an edit pattern it becomes possible to

    WC_WI_NEXT%   = NEXT_FIELD
    WC_MV_NEXT%   = "@" : WC_MV%
    WC_AMV_ACTION%     = 4
    WC_RESET%          = 4

(Volume 3, Issue 5, Page 10)