Workarounds For Displaying Additional Views In Sharepoint Document Libraries
What’s Causing the Issue
SharePoint document libraries can only display up to 8 views by default. This limit is hard-coded into SharePoint to ensure optimal performance. Having additional views can negatively impact the speed that libraries load. The list view threshold, which governs the maximum number of items that can be displayed in a library view, also constrains the number of usable views.
The list view threshold depends on the hardware SharePoint is hosted on and farm configuration. SharePoint Online and Office 365 have a 5000 item limit per view. On-premises farms often have a 20,000 or lower threshold, depending on available resources. Libraries with over 5000 items will need views filtered in some way to avoid throttling issues.
Workarounds to Add More Views
Use Folders to Split Up Libraries
One simple workaround to get more views is to break the library up into separate folders and set unique views at the folder level. This keeps the overall library within the view limit but segments content to allow for additional customizable sorting and filtering options. This approach works best for relatively static content with clear divisions.
Leverage Metadata Navigation
Another good workaround is using metadata-driven views so users can filter based on properties like content types and column values instead of traditional views. This metadata navigation allows dynamic filtering while keeping the number of persistent views limited. Columns enhanced through metadata can have nearly unlimited filtering while yielding good performance.
Build Custom Views with SharePoint Designer
For sites with heavy information architecture requirements but undefined metadata, SharePoint designers can build custom AllItems.aspx pages to create enhanced views. This involves using SharePoint Designer to manipulate the XSL stylesheets and data query APIs to filter, sort, and display library content beyond default settings.
Migrate to PowerApps for Unlimited Custom Views
The most scalable approach for robust custom views is building a PowerApp that interfaces directly with SharePoint list data. PowerApps have unlimited potential for tailored views with a UI completely customized to specific needs. This represents the highest degree of complexity but also flexibility. The downside is training and governance to ensure a smooth transition for users from regular document library views to PowerApps interfaces.
Example Code for Custom View in SharePoint Designer
Here is example XML code that can add an “All Documents Categorized” view grouping items by a managed metadata column:
<View Name="{7B25DFF5-EEDB-421E-8DAB-794761C498C2}" DefaultView="FALSE" Type="HTML" DisplayName="All Documents Categorized" Url="/sites/team/Shared Documents/Forms/AllItems.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/15/images/dlicon.png?rev=45"> <Query> <OrderBy> <FieldRef Name="TaxKeyword"/> </OrderBy> </Query> <ViewFields> <FieldRef Name="DocIcon"/> <FieldRef Name="LinkFilename"/> </ViewFields> <RowLimit Paged="TRUE">30</RowLimit> <JSLink>clienttemplates.js</JSLink> </View>
This view can be added to AllItems.aspx in SharePoint Designer. After pasting this XML into the appropriate location within the Views elements, save the file. The new Document Categorized view will now appear as a library view option.
Considerations When Expanding Views
Performance Implications of Additional Views
There are potential performance trade-offs that come with exceeding the 8 view limit. Each additional view puts extra load on SQL databases storing libraries. Custom coded views also require extra processing compared to out-of-box options. Performance should be baseline before adding views then monitored after rollout to gauge impact.
Governance to Ensure Consistency
Expanded views requires additional information architecture governance, especially with custom options. Standards should establish naming conventions, intended frequencies of use, and maintenance cadence upfront. Any folders, metadata fields or PowerApps pivoting views should be vetted to prevent a convoluted taxonomy developing over time.
Training End Users on New Navigation
No matter the workaround employed, additional views require some level of user re-training to leverage properly. Clear documentation, embedded help features, and demos during orientation ease this transition. Teach-back assessment should confirm user understanding and ability to navigate all available views. Surveys post-deployment can gauge effectiveness and overall usability.