Page 1 of 1

Getlabel: Return more than one label

Posted: June 1st, 2015, 9:01 pm
by htuser
Dear all,
I have a multiple choice question and i want to have the label for several's choices. By example:
What's your favorite fruit?
Mangoes:1/
Banana:2/
Apple:/3
Pineapple:4/
Others:5
The response is: 1/3/4/5
I want to transform it dynamically with getlabel function, but, this return only the first one label (If the symbol is an item name, then the value labels from the first value set are returned).
Please, how to return all label so the response is recoded: Mangoes-Apple-Pineapple-Others?
Thanks in advance!

Re: Getlabel: Return more than one label

Posted: June 2nd, 2015, 11:11 am
by josh
You can pass the name of the value set to getlabel instead of passing the dictionary variable name. In other words instead of getlabel(SEX, 1) you can do getlabel(SEX_VS2, 1).

Re: Getlabel: Return more than one label

Posted: June 2nd, 2015, 11:33 am
by htuser
Thanks, i will try it!
Regards,