How to display more than 3 views in SharePoint 2013/2016/Online list or document library

display more than 3 views in SharePoint online list or document library
SharePoint deveopment training course

This SharePoint customization tutorial, we will discuss, how to display/show more than three views in SharePoint 2013 list or document library.

The same script code we can use in SharePoint 2013/2016 or in SharePoint Online to show more than three views in SharePoint list or library.

By default if you open any SharePoint list or document library, then you can see it will see 3 views in the page and rest of the views you can see after clicking on the (…) like below:

display more than 3 views in SharePoint list or document library

As you can see in this example, you will be able to see 3 links like All Items, View-1 & View-2 and rest two views we can see after clicking on the … button.

Display more than 3 views in SharePoint List or Library

We can add a few lines of script code to display more than 3 views in SharePoint list or libraries.

Open the SharePoint list or library and then Edit the page. Then add a Web Part and then from the web part categories select Media and Content and then choose Script Editor web part like below:

display more than 3 views in SharePoint 2013 list or document library

Then click on EDIT SNIPPET and then put the below code.

<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(IncreaseSurfacePivotCount, 'clienttemplates.js');

function IncreaseSurfacePivotCount() {
ClientPivotControl.prototype.SurfacedPivotCount = 5;
};
</script>

Here 5 is the number of views you want to appear on the page.

Then Save the page.. Once you refresh the page you can see all 4 list views are appearing like below:

display more than 3 views in SharePoint online list or document library

Below is a screen show from how it is appearing in a SharePoint 2016 list.

display more than 3 views in SharePoint 2016 list

You may like following SharePoint list or library tutorials:

Hope this will be helpful to know how to display more than 3 views in SharePoint 2013/2016 or SharePoint Online list or document library.

Check out Best Alternative to InfoPath -> Try Now

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

About Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

View all posts by Bijay Kumar →