Any solution that will limit the number of times an item can be chosen in a choice column?

Mar 12, 2014 at 9:56 PM
Hi there,

I was wondering if there is any solution in SPServices that will allow the following:-

_I have a survey with a couple of questions and one of the columns is a choice of times - lets say options are 11:00am, 11:15am and 11:30am.

My question is can I limit the survey so that if 11:00am has already been selected 10 times in the responses, the 11th response cannot be saved and they will need to select another time?_

Any ideas would be fantastic.

Mar 12, 2014 at 10:30 PM

There's nothing specific in SPServices for your exact needs (I'd never have come up with that requirement!), but you can build it with SPServices and jQuery as your toolkits.

Mar 12, 2014 at 10:39 PM
Thanks for the quick reply Marc.

Unfortunately, I have in the past relied on your expertise to guide me through :-) I don't know how to code so I wouldn't be able to create my own.

Thanks anyway!
Mar 13, 2014 at 3:38 PM
It would be a matter of calling GetListItems to retrieve all of the prior responses, counting the number of times each choice has been selected, and disabling the choices where the maximum has been reached.