Logic in Roster

What would you like to see in CSPro?
Forum rules
New release: CSPro 8.0
Post Reply
Ekoutiame
Posts: 2
Joined: May 14th, 2021, 9:43 pm

Logic in Roster

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Logic in Roster

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