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
Logic in Roster
-
- Posts: 1801
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: Logic in Roster
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.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;