In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
Home page Home page Home page Home page
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel

Redisplaying Multi-Values

A confusing feature of AREV is knowing which WINDOW_COMMON% variables to use where. Several people have asked how they can load a set of associated multivalues from an option key on a field and have the system recognise the fact that the multivalues have been loaded.

For example, we might want to press F2, load up a set of booking information (artiste, date and time) dependant on the F2 response and then return to the screen and individually amend these items. Simply plugging the information into @RECORD does not work. The data is there but the status line tells you that you are on Amv 1/0.

To achieve this, it is necessary to tell the system to redisplay @RECORD (WC_DISPLAY_ACTION% = 5), to recalculate the current prompt (WC_RESET% = 4), that the AMV values have been changed (WC_AMV_ACTION% = 5) and how many rows deep the AMV now is (WC_AMV_VARS%<0,3> = counter). Eg

0001            *
0002            *    This code is on an F2 key.  The user has been prompted
0003            *    for whether or not to load a parameter table into the
0004            *    current record.  The parameter table is a set of
0005            *    associated MVs in PARAM and it has to go into @RECORD<2-4>
0006            *
0007            IF USER.RESP = "Y" THEN
0008                 FOR X = 1 TO MVS.TO.LOAD
0009                      @RECORD<2,-1> = PARAM<1,X>
0010                      @RECORD<3,-1> = PARAM<2,X>
0011                      @RECORD<4,-1> = PARAM<3,X>
0012                 NEXT
0013                 *
0014                 *    Now toggle WINDOW_COMMON% variables (inserted at
0015                 *    beginning)
0016                 *
0017                 WC_DISPLAY_ACTION% = 5
0018                 WC_AMV_ACTION% = 5
0019                 WC_AMV_VARS%<0,3> = MVS.TO.LOAD
0020                 WC_RESET% = 4
0021            END

(Volume 1, Issue 10, Page 4)
Pixel Footer R1 C1 Pixel