Something good to know…
Some time ago, I wrote a blog post (SharePoint Online List View Threshold) on the dreaded list view threshold error many of us face from time-to-time and I demonstrated in that post how you could in fact exceed 5000 items in a grouped view. I even had the screenshot to prove it! Earlier this week, I got the familiar ice-cream cone Something went wrong message in a large library I was working with, so I set out to determine why I was getting the error even though there was a column index defined on the column being grouped on.
My conclusion? It matters what data type the column is that you’re wanting to group and filter by to determine if you’ll receive the list view threshold error.
If you’re short on time, skip down to the Summary section where I list the column types allowing you to exceed 5000 items if you need to group and filter by them.
I had a document library with just over 6800 documents in it and no folders. The library had 2 pieces of metadata:
- Document type (lookup column)
- Fiscal year (managed metadata column)
Two column indexes were added for each of the above columns (You can add a column index after you exceed 5000 items without issue) and two views were created to group by Document Type and Fiscal Year respectively. Each of the views failed with this familiar exception:
I noticed the column I was grouping on in this example was a Choice data type. I immediately wondered if this could make a difference? It turns out… yes!
If you think you’ll exceed 5000 items in a list/library and you want to group your content in a flat view by one of your columns, you need to ensure the column is one of the following data types and a column index is created for it:
- Single line of text
However, if you attempt to group/filter by any of the following column types and the view will exceed 5000 items for the group, you will continue to get the list view threshold error even if a column index is created:
- Managed Metadata
This is important to know particularly for those organizations tagging content with managed terms in large libraries. The managed metadata column type is something I regularly recommend to tag content across a tenant/farm.
The Takeaway? Watch your column types if you think your list/library will exceed 5000 items. As stated in the Microsoft documentation referenced in the Something went wrong error message (Support link from Microsoft and excerpt below), there is reference to the people, lookup, or managed metadata columns (circled in red below) however not specifically listed for the group by setting. I can now confirm they’re to be avoided for sorting/grouping in large lists.
Thanks for reading.