I had a recent assignment to test the performance of a List. The list was behaving really slow and I need to determine the total number of items in the list.
Aaaah ………… there starts the problem. I wanted the total number of items in the list and I could only do that by navigating through the List Item pages which was around 20,000 + Items, So need to click through every single pages and it would take couple of months to figure out the exact numbers. Then I thought about the "Calculated Columns" in Sharepoint.
Finally I figured out to get the total count of the Items in a Sharepoint List. Here are the steps -
Step 1.
Create a "Calculated (calculation based on other columns) " column in the List
Step 2.
Column Name - "Total"
The Type of Information in this column - "Calculated"
In the Formula Column put - "=SUM(ID)" (without apostrophise)
Select "The data type returned from this formula is: " as Number
Step 3.
Select "OK" - a new column will be added to the List and then you could see the Column "Total" which would display values from 1 to End number in ascending order. If you click the header "Total" the list would be displayed in descending order displaying the Total number of the Items in the list.
Friday, March 26, 2010
Total Count of Items in a List in Sharepoint 2007
Subscribe to:
Post Comments (Atom)
5 comments:
Bless you!! This was exactly what I was trying to do and wandering throughout the web and blogs and posts. Your description is very clear and I was successful in listing the number of items in a folder. Thanks!!
Howdy. Great post! I'm working with 2010 and ran into a snag. I need to limit an attendee list to 10 people. My thought was to use this recomendation and then toss some validation to the field. the problem is that the calculated field is only working for items currently in the list. It is not working for new items. Any suggestions?
There is a problem.
If some items were deleted from the list, the total count will not reflect the change. The ID was issued to each of the item when it was created and will not changed forever, it seems.
Thanks a lot for your nice post ! But I think you must write the formula as "=COUNT(ID)" as your formula will return the cumulative sum and not the number of items.
Cheers,
Hi,
I don't get it.
Why don't you just go to 'View All Site Content' where all lists and libraries are listed? The number of items per list is also displayed there; out of the box...
Have a nice day
Post a Comment