Fix SharePoint Online Modern Library View Sorting and Grouping Errors
Question details
Resolve an error when sorting or grouping documents in a large SharePoint Online library's Modern Experience.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- A user sorts or groups documents in a library containing approximately 8,000 items.
- Observed behavior
- The All Documents view loads, but sorting or grouping displays a “Something went wrong” error in the Modern Experience. The same actions work in Classic Experience, even though the relevant columns are indexed.
Confirm whether the All Documents view loads and identify the columns used to sort, group, and filter. You may need library owner permissions to inspect indexes and edit views.
Index the relevant columns and simplify the library view
Use a filtered, simpler view to reduce the number of items SharePoint must process when sorting or grouping.
Large library operations can encounter the SharePoint list view threshold, commonly 5,000 items. Indexing helps, but it does not guarantee that every sort or grouping operation will work.
Open the document library, select Settings > Library settings, and look for Indexed columns. Create indexes for columns used in filters, sorting, or grouping if they are not already indexed.
Open the view menu in the library and choose Edit current view, or open the view from Library settings. Add a filter using an indexed column to narrow the results, ideally below 5,000 items.
In the view settings, remove unnecessary grouping and sorting, save the view, and reopen it. Test sorting and grouping one at a time to identify which operation triggers the error.

Test the library in Classic Experience
Use Classic Experience to compare the behavior and, if available, continue working while the Modern Experience issue is investigated.
Collect error details and contact Microsoft Support
Escalate the issue if a filtered, simplified view still fails in the Modern Experience.
Edit Office documents with WPS Office
WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move your editing workflow. It does not fix SharePoint library view errors.

Frequently Asked Questions
Why does the library load but fail when I sort or group it?
The All Documents view may load successfully while a sort or group operation requires SharePoint to process more items than the list view threshold allows. Try a selective filter on an indexed column and simplify the view.
Why does the error occur even though my columns are indexed?
Indexes help SharePoint find items, but they do not guarantee that every sort or grouping operation will work. Edit the view to narrow the results and test each operation separately.
Where can I check whether a SharePoint column is indexed?
Open the document library and go to Settings > Library settings > Indexed columns. You may need library owner permissions to view or create indexes.
What should I send Microsoft Support?
Provide the library URL, affected view and column, the operation that fails, the error time, and any displayed correlation ID. Also report whether the same operation works in Classic Experience.




