CONVERTING CHECKBOX RESPONSES INTO YES NO ANSWERS
Posted: March 29th, 2022, 1:36 pm
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
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