Redisplaying Multi-Values
Published By | Date | Version | Knowledge Level | Keywords |
---|---|---|---|---|
Sprezzatura Ltd | 01 APR 1990 | 1.16+ | EXPERT | MULTIVALUE, WINDOW_COMMON%, WC_DISPLAY_ACTION%, WC_AMV_ACTION%, WC_RESET%, WC_AMV_VARS%, WC_AMV% |
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
* * This code is on an F2 key. The user has been prompted * for whether or not to load a parameter table into the * current record. The parameter table is a set of * associated MVs in PARAM and it has to go into @RECORD<2-4> * IF USER.RESP = "Y" THEN FOR X = 1 TO MVS.TO.LOAD @RECORD<2,-1> = PARAM<1,X> @RECORD<3,-1> = PARAM<2,X> @RECORD<4,-1> = PARAM<3,X> NEXT * * Now toggle WINDOW_COMMON% variables (inserted at * beginning) * WC_DISPLAY_ACTION% = 5 WC_AMV_ACTION% = 5 WC_AMV_VARS%<0,3> = MVS.TO.LOAD WC_RESET% = 4 END
(Volume 1, Issue 10, Page 4)