0

I am creating a new solution based on a custom list. One of the fields will be Name. I would like to limit the number of new items with the same value. For instance, only 12 items could be created with my name in the Name field.

Does anyone know of a way to do this using out of the box solutions? I have designer and site collection admin access but no central admin/server access.

thanks,

Z

1

One way of doing it would be using an Event Receiver (which may require more priviliges than what you may currently have). This post shows how to put one together. Within the ItemAdding() & ItemAdded() methods you could do your required checks on the Name field & limit it to 12 instances and react accordingly -

Example: Creating a List Item Event Handler

0

Here is what you can do. Open the page NewForm/Editform in the SP Designer. Write Javascript code to attach onclick event to the OK button. Write code in Javascript client object model which will query the list and find the number of items with the same name. If it is greater than 12 you can show the alert and cancel the save.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.