Hi ETUser,
pos and
ischecked definitely yield the same result for a single character field. However, the logic snippet showed searches for 2, 3, and 23, so there is at least one two-digit field that needs to be accounted for.
Checkboxes are intended for situations when the user can select more than one response (as in our example, how many languages do you speak). So, if the user wanted to select 2, 3, and 23, the logic you provided would fail, since in that situation the string length would be 4, and they would never be able to find the '2' and '3' responses.
However I should point out, if wishing to use the capture type checkbox for an alpha field, there are several requirements. Specifically,
- The variable (F110) must be an alpha string
- F110 must be a multiple of the # of responses provided
- Each response within F110 must be the same length (I'm using a FW of 2)
- If the responses are 2+ characters long, then they must use zeros or other visible characters to fill the string; leading or trailing spaces are not allowed
Therefore, the allowable responses would be 02, 03, and 23, and (if these were our only responses) the field length of F110 = 6. The updated logic would be:
PROC F110
if ischecked("23",$) then
warning("PLEASE ACCOMPLISH CAF FORM 29 – HOUSEHOLD REFERRAL FORM AND FORM 28 – ESTABLISHMENT REFERRAL FORM.");
skip to F114;
elseif ischecked("02",$) then
warning("ACCOMPLISH CAF FORM 29 – HOUSEHOLD REFERRAL FORM.");
elseif ischecked("03",$) then
warning("ACCOMPLISH CAF FORM 28 – ESTABLISHMENT REFERRAL FORM.");
skip to F114;
endif;
Thanks for writing.
Sherrell