Validation issue in Checkbox
Posted: June 27th, 2022, 7:44 am
Dear team,
I have issue in validation checkbox, when I adopt the below conditions. when I select other options and refused the validation works perfectly , but when select only refused -88 or No other sourced -12 then I am not move to next variables.
PROC Q19
if not checkboxHasSelection(Q19) then
errmsg("Please choose at least one option");
reenter;
endif;
numeric choseprimaryoccup = poschar("0102030405060708091011", Q19) > 0;
numeric choserefuesed2 = ischecked("88", Q19);
if choseprimaryoccup and choserefuesed2 then
errmsg("'Refused' If refused, other options cannot be select.");
reenter;
endif;
numeric choseprimaryoccup1 = poschar("0102030405060708091011", Q19) > 0;
numeric choserefuesed3 = ischecked("12", Q19);
if choseprimaryoccup1 and choserefuesed3 then
errmsg("'No other source' If No other source of income, other options cannot be select.");
reenter;
endif;
Thanks,
PP
I have issue in validation checkbox, when I adopt the below conditions. when I select other options and refused the validation works perfectly , but when select only refused -88 or No other sourced -12 then I am not move to next variables.
PROC Q19
if not checkboxHasSelection(Q19) then
errmsg("Please choose at least one option");
reenter;
endif;
numeric choseprimaryoccup = poschar("0102030405060708091011", Q19) > 0;
numeric choserefuesed2 = ischecked("88", Q19);
if choseprimaryoccup and choserefuesed2 then
errmsg("'Refused' If refused, other options cannot be select.");
reenter;
endif;
numeric choseprimaryoccup1 = poschar("0102030405060708091011", Q19) > 0;
numeric choserefuesed3 = ischecked("12", Q19);
if choseprimaryoccup1 and choserefuesed3 then
errmsg("'No other source' If No other source of income, other options cannot be select.");
reenter;
endif;
Thanks,
PP