Getlabel: Return more than one label

Discussions about CSEntry
Post Reply
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Getlabel: Return more than one label

Post 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!
G.VOLNY, a CSProuser from Haiti, since 2004
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Getlabel: Return more than one label

Post 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).
htuser
Posts: 632
Joined: December 19th, 2011, 6:26 pm
Location: Silver Spring Area, MD, USA

Re: Getlabel: Return more than one label

Post by htuser »

Thanks, i will try it!
Regards,
G.VOLNY, a CSProuser from Haiti, since 2004
Post Reply