Create fills for a radio button answer

Discussions about CSEntry
Post Reply
ines_vilela
Posts: 1
Joined: October 4th, 2016, 11:16 am

Create fills for a radio button answer

Post by ines_vilela »

Hi everyone,

I have a rooster where I ask for the name of 7 people you talk about agriculture.

Later on I want to ask, from the people with whom you speak about agriculture, who is the one you trust the most?
And I would like to have as a radio button answer the names inputted on the previous rooster, so that enumerator simply has to pick the name.

I tried doing the same as if I was creating fills for questions (generating alpha variables with names and using %var1% %var2% ... as valuesets) but it didn't work.

Any ideas? Any help with be great! thanks
jfigueroa
Posts: 100
Joined: August 28th, 2014, 12:46 pm

Re: Create fills for a radio button answer

Post by jfigueroa »

Hi ines_vilela,

You can try something like:

Code: Select all

PROC GLOBAL 
array string labels(7); 
array numeric codes(7);

PROC NAME_PERSON
labels(curocc(ROSTER)) = NAME_PERSON(curocc(ROSTER));
codes(curocc(ROSTER)) = curocc(ROSTER);

PROC TRUST_PERSON
Preproc
setvalueset(TRUST_PERSON_VS, codes, labels);
I hope that could work.
You can also take a look for "setvalueset" Function on CSPro Help.

Regards.
Post Reply