3

We using a Sharepoint 2010 and I need to make a list where people will be able to apply for event. Event is for max 30 people, and I want to disable "Add new item" if list already have 30 attendees. I have next columns in my list:

  • ID
  • Attendee
  • Applied ON

I also set a counters for columns (/List Settings/Views/All Items/Totals => set to Count) and I have an insight to current number of rows on the top of the page, but I want to be fully professional :)

I was try in Validation Settings with:

=ID>30

but, this is not a solution, cause people can change mind and delete them self from event, and ID increasing every time.

Does anybody know how can I use already set "Counter" from the top of the list columns. I would like to use it in Validation Settings as simple formula, similar as above mentioned with ID (maybe better question: Can it be used), or any other solution to complete this, on first view, simple task??

Thanks in advance.

1

You can not do it with a Validation rule, as the Validation only applies to the current Item, it has no awareness of All/Other items

see: How to limit the number of entries/records to a maximum in a List

  • I already tried with link you mentioned, but I haven't enough programing experience. I suppose that I should make .txt file with code from link, change a code little bit to apply for my list, but I don't know for sure what to editing in code and where to upload file. – stiw47 Apr 1 '17 at 12:22
  • 1
    Then it is like diving.. If you haven't got your PADI license yet, only go snorkling. Create a Playground SiteCollection and start learning there. The answers have all the info you need, but you can't expect to learn it in 15 minutes – Danny '365CSI' Engelman Apr 1 '17 at 12:25
0

You could do this with an auxliarry list - which keeps count of the number of active records - this is aux list is updates via a workflow. You'll need to hide the new/edit form delete buttons (easy to do with CSS and firefox inspect element). then add a field called 'delete?' yes/no and if they specify yes, just have the workflow update the aux list number and then delete the record itself (reset the delete field to no in case someone retores it from the recycle bin). in the aux list, you just need title and a number field (called 'count' maybe). create one record with title = "eventcount" and number = 0 the workflow upon creation looks up the aux list entry with title = eventcould and gets the counts - adds one to it - puts it back on the aux list. Don't dispaly the aux list to the user (but don't hide it from the browser). make sure everyone has contribute permissions to the aux list however if they have contribute to the primary list. I've used this technique dozens of times. questions?

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.