Hi forum members!
Need assistance on how to convert checkbox responses from MULT RECORDS into "Yes/No" answers.
Understandably for a singly occ record I could apply the following logic in a batch program to convert into yes/no answers. However in a mult record indeed I need your help.
string code = "ABCDEFGHXY";
do numeric i = 1 while i <= length($)
insert(PERSON_EDT(i));
if ischecked(code[i:1], $) > 0 then
X(i) = i;
Y(i) = 1; errmsg("Yes");
else
X(i) = i;
Y(i) = 2;
endif;
endif;
enddo;
e.g. Items in a roster below how does it work to convert checked/unchecked responses into yes/no answers?
Person # Chkd Answers
1 ABC (Yes/Yes/Yes
2 B (No,Yes,No)
3 C (No,No,Yes)
Best to you all guys,
Saidi
CONVERTING CHECKBOX RESPONSES INTO YES NO ANSWERS
Re: CONVERTING CHECKBOX RESPONSES INTO YES NO ANSWERS
Dear Saidi,
Josh helped me years ago (even before having the native isChecked function) to solve this issue. There's a sample, part from an old survey (nearly four years ago).
The way is to create subitems (or Items) from the main checkbox question. In subitems (items) each question must have Yes/No valuesets.
And used Ischecked (estChoisi user defined function in the sample) to populate them.
It's a time consuming process. It's why, years ago, i requested this
My example and comments are in french and creole.
Please help me know if this explanation is clear for you.
Best,
Josh helped me years ago (even before having the native isChecked function) to solve this issue. There's a sample, part from an old survey (nearly four years ago).
The way is to create subitems (or Items) from the main checkbox question. In subitems (items) each question must have Yes/No valuesets.
And used Ischecked (estChoisi user defined function in the sample) to populate them.
It's a time consuming process. It's why, years ago, i requested this
But, it's not yet implemented.CSPro Designer/CSPro Dictionary Engine: Automatically create subitems for checkbox response (split a multiple response (checkbox) to discrete variables) viewtopic.php?f=1&t=2114 / viewtopic.php?f=1&t=832
It will be very important to parse checkbox in subitems with Yes/No for each checkbox elements. We can't perform serious analysis without parsing actual CSPro checkbox. And, actually it's very time consuming to do this manually.
My example and comments are in french and creole.
Please help me know if this explanation is clear for you.
Best,
G.VOLNY, a CSProuser from Haiti, since 2004
Re: CONVERTING CHECKBOX RESPONSES INTO YES NO ANSWERS
Dear htuser,
To some extent the explanation is clear, so let me workaround to see whether I will able to implement it.
Thank you very for your kid support.
Best,
Saidi
To some extent the explanation is clear, so let me workaround to see whether I will able to implement it.
Thank you very for your kid support.
Best,
Saidi