restriction of multiple options alpha entry

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
muhaliraza
Posts: 44
Joined: February 1st, 2018, 9:00 am

restriction of multiple options alpha entry

Post by muhaliraza »

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: 29
Joined: January 25th, 2017, 12:38 pm

Re: restriction of multiple options alpha entry

Post by kompiler »

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: 97
Joined: May 28th, 2015, 3:16 pm

Re: restriction of multiple options alpha entry

Post by sah »

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;
Post Reply