Making setvalueset (using a prev HH list) a check box option
Posted: June 2nd, 2015, 6:26 pm
Hi, Just had a quick question, don't know if it can be done or not but thought I'd give it a shot. Using the code below I am taking a previously listed household roster and turning it into a value set for a future question. I've tried but I can't figure it out, is there any way that I can make this value set multiple choice, using check boxes? Have tried different response box lengths, ect. and haven't been able to find a way. Would be nice in some instances to select more than one family member depending on the question, using this example. Thanks!
preproc
X3_TP = totalPopulation;
{person_num = curocc(); { the current person number }
$ = person_num;}
numeric i;
do i = 0 until i = totalPopulation
namesVSCodes(i) = i + 1;
currentHHName = strip(A1(i+1));
namesVSNames(i) = maketext(currentHHName);
enddo;
namesVSCodes(i) = 66;
namesVSNames(i) = "END Household Members";
namesVSCodes(i+1) = notappl;
setvalueset(NAME_TEST, namesVSCodes, namesVSNames);
preproc
X3_TP = totalPopulation;
{person_num = curocc(); { the current person number }
$ = person_num;}
numeric i;
do i = 0 until i = totalPopulation
namesVSCodes(i) = i + 1;
currentHHName = strip(A1(i+1));
namesVSNames(i) = maketext(currentHHName);
enddo;
namesVSCodes(i) = 66;
namesVSNames(i) = "END Household Members";
namesVSCodes(i+1) = notappl;
setvalueset(NAME_TEST, namesVSCodes, namesVSNames);