[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how limit the items in a custom list

Posted on 2011-10-04
11
Medium Priority
?
566 Views
Last Modified: 2012-05-12
Hi,

I want to use a custom list as as a form for reservation. I wan't to limit the number of items in this list. Is it possible?

Thanks.
0
Comment
Question by:Provost
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 16

Expert Comment

by:jessc7
ID: 36914182
What do you want the end-user experience to be?
0
 
LVL 2

Expert Comment

by:typerracer
ID: 36914754
You could write a custom event receiver in .NET that checks the number of items in a list whenever a new item request is made and check the number of items in the list against your preset allowed number of items.
0
 

Author Comment

by:Provost
ID: 36921081
Thanks for your time,

But I don't have access to development server.  I only have access to SharePoint Designer as site collection admin.  
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 16

Expert Comment

by:jessc7
ID: 36921147
You could have a workflow that queries the list to see how many items there are, and delete any once the limit is reached.

Not a good user experience though.
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 36921228
This is a wonky workaround, but like you, I only have access to SPD so I have to be creative.

I would create a list column that increments with each registration. Then I would create a custom NewForm.aspx (make a copy of the default NewForm.aspx, do not edit it!) and add a text area that tells the user that the class is full.  I would use conditional formatting to hide that text area until the max number of registrants is reached, and set all the other columns in the newForm to display only when the number of registrants is less than the limit.  Then I'd set the custom NewForm as the Supporting File for that list. I've used this trick many times and it's been a lifesaver.
0
 

Author Comment

by:Provost
ID: 36921243
Hello,

I want to my users to make reservation for an activity thru a form like
Name:
Email:
Etc...
This form will be the NewForm.aspx when you create a new item of in a list. I want to have a maximum 20 persons by activity.
I don't have access to development server.  I only have access to SharePoint Designer as site collection admin.  
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 36921262
You should be able to do all of the above in SharePoint Designer. If you're not sure how to create a custom NewForm, try this:
http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?List=676af157%2D7d96%2D4e15%2Da987%2D54b8a3e4d948&ID=73

Good luck!
0
 
LVL 4

Expert Comment

by:TEEDA
ID: 36921284
I should mention that in the above post, you only need to do Steps 1 and 2, then set the conditional formatting on the Custom List Form fields you insert.   When you're done, set the custom NewForm as the supporting file for the list (in SharePoint Designer).
0
 

Author Comment

by:Provost
ID: 36924430
Thanks Teeda,

I read, then blog you mention above, very interesting. I've never done that, so there will be some learning. But I understand most of it. The only thing I wonder about is how to increment my counter. From then article I understand I can retrieve its value. But where do you put the logic to add + 1?  With some JavaScript?

Tanks
0
 
LVL 4

Accepted Solution

by:
TEEDA earned 2000 total points
ID: 36924825
I think I would use a workflow that increments a "count" column when new item is created. I imagine there are lots of ways to do it, and if you can write javascript, that sounds like a good solution.
0
 

Author Closing Comment

by:Provost
ID: 36925241
Thanks, I will try with a workflow.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question