Page 1 of 1

Logic in Roster

Posted: May 15th, 2021, 8:02 am
by Ekoutiame
Hello CSPro users, hope you are good. I will need your assistance in Roster Logic. I have a Roster which present a list of names where interviewer have to choose a certain nombre of name from the list. I want to write a logic in the Roster so that the enumerator can not select the same name more than once.

Thank you in advance for your help!

Ekoutiame

Re: Logic in Roster

Posted: May 17th, 2021, 11:57 am
by Gregory Martin
You can use logic to see if the name has been entered on a prior occurrence. Something like this:
PROC NAME

string this_name = NAME;

if seek(NAME = this_name) < curocc() then
    errmsg
("You cannot enter the name %s more than once.", strip(NAME));
   
reenter;
endif;
Note that this will only check for exact matches.