Page 1 of 1
Multiple value sets
Posted: December 20th, 2015, 1:58 pm
by quicnsereko
Hello, I have a column (main variety) in the roster whose values are different depending on crop chosen in previous question which is not in the roster. Could you help me with this. Thanks
Re: Multiple value sets
Posted: December 21st, 2015, 9:41 am
by josh
You can define multiple value sets for the main variety variable in the dictionary and then use the command setvalueset() from logic to change the value set based on the crop chosen. setvalueset() is usually used in the onfocus proc so your logic would look something like:
Code: Select all
PROC MAIN_VARIETY
onfocus
if CROP = 1 then
setvalueset(MAIN_VARIETY, MAIN_VARIETY_VS_MAIZE);
elseif CROP = 2 then
setvalueset(MAIN_VARIETY, MAIN_VARIETY_VS_BEANS);
etc...
Re: Multiple value sets
Posted: December 28th, 2015, 2:26 am
by quicnsereko
Worked perfectly, Thanks