restriction of multiple options alpha entry

Discussions about CSEntry
muhaliraza
Posts: 17
Joined: February 1st, 2018, 9:00 am

restriction of multiple options alpha entry

Postby muhaliraza » April 16th, 2018, 7:03 am

I have a multiple option alpha question having value of A to F and Z. Z is for dont know. I want that if the interviewer select the z option then other options A to F did not enter into to the field.

kompiler
Posts: 23
Joined: January 25th, 2017, 12:38 pm

Re: restriction of multiple options alpha entry

Postby kompiler » April 16th, 2018, 9:00 am

PROC alpha_item
PostProc
if pos('Z',$) and length(strip($)) <> 1 then
errmsg("Option Z cannot be selected together with other options");
reenter;
endif;

alpha_item - is your multiple option alpha question

sah
Posts: 95
Joined: May 28th, 2015, 3:16 pm

Re: restriction of multiple options alpha entry

Postby sah » April 16th, 2018, 3:22 pm

Better still you can use the function in global and invoke it :

Code: Select all

function cannotSelect(String varNone, string char)
   numeric lenSelected = length(strip(varNone));
   if lenSelected >1 and pos(char,varNone)then
      errMsg("You cannot select 'NONE' with other options ");
      reenter;
   endIf;
end;


Return to “Entry”