Logic in Roster

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

Logic in Roster

Post by Ekoutiame » May 15th, 2021, 8:02 am

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: 1494
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Logic in Roster

Post by Gregory Martin » May 17th, 2021, 11:57 am

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