Sometimes a SharePoint admin might want to limit the number of items allowed in a list. This can be done in various ways, but in my latest kalmstrom.com Tip I am showing how to use the validation settings to stop new items from being added.
Edit but not add
You can of course use SharePoint permissions to prevent users from adding list items, but SharePoint has no permission level that allows users to edit a list but not add items to it. The method I am showing restricts users from adding new items, while they still can edit the existing items.
Booking limit
I made this demo for a client who lets students notify their presence at lectures by booking a seat in the room where the lecture will be held. This client wanted to limit the number of bookings in a classroom, so that each student got a chair to sit on. Only 25 students should be able to book a place in a room with 25 seats.
Validation setting
Each classroom has its own SharePoint list, and the first step is to add the maximum number of items to each classroom list. Then I will use the validation settings to make sure no more than the allowed number of items can be used.
Validation settings are normally used to guarantee that no invalid items will be entered in a SharePoint list. In those cases a formula sets certain conditions that must be true for a new item to be allowed in the list.
To limit the number of items I use the validation the other way around: I set a condition for new items that will never be true, and that way no new items can be added.
The kalmstrom.com Tips section
New tips are added to the Tips section of the kalmstrom.com website almost every week. Now they are so many that we have had to create a new content page. The old content page did not give a good overview anymore, even though we separated the articles into two content pages: one for SharePoint and one for Outlook, Excel and the rest. Now links to all articles are gathered on one page again, and I hope that the new content will make it easier to find what you are looking for.
The Tips articles are financed by advertisements, so they do not burden the kalmstrom.com Solutions – but we know that users of our software often visit the pages and learn from the articles. You are welcome to do so you also!
By Peter Kalmstrom
CEO and Systems Designer
kalmstrom.com Business Solutions
Edit but not add
You can of course use SharePoint permissions to prevent users from adding list items, but SharePoint has no permission level that allows users to edit a list but not add items to it. The method I am showing restricts users from adding new items, while they still can edit the existing items.
Booking limit
I made this demo for a client who lets students notify their presence at lectures by booking a seat in the room where the lecture will be held. This client wanted to limit the number of bookings in a classroom, so that each student got a chair to sit on. Only 25 students should be able to book a place in a room with 25 seats.
Validation setting
Each classroom has its own SharePoint list, and the first step is to add the maximum number of items to each classroom list. Then I will use the validation settings to make sure no more than the allowed number of items can be used.
Validation settings are normally used to guarantee that no invalid items will be entered in a SharePoint list. In those cases a formula sets certain conditions that must be true for a new item to be allowed in the list.
To limit the number of items I use the validation the other way around: I set a condition for new items that will never be true, and that way no new items can be added.
The kalmstrom.com Tips section
New tips are added to the Tips section of the kalmstrom.com website almost every week. Now they are so many that we have had to create a new content page. The old content page did not give a good overview anymore, even though we separated the articles into two content pages: one for SharePoint and one for Outlook, Excel and the rest. Now links to all articles are gathered on one page again, and I hope that the new content will make it easier to find what you are looking for.
The Tips articles are financed by advertisements, so they do not burden the kalmstrom.com Solutions – but we know that users of our software often visit the pages and learn from the articles. You are welcome to do so you also!
By Peter Kalmstrom
CEO and Systems Designer
kalmstrom.com Business Solutions
No comments:
Post a Comment