Show More Views In SharePoint List

Introduction

This blog demonstrates how to show more Views in SharePoint List as, by default, only two Views are visible.

To view all the views SharePoint

First, create a .txt file and paste the following code into that text file. You can name the file as ShowallViews.txt.

  1. <script type="text/javascript">  
  2.     ExecuteOrDelayUntilScriptLoaded(overrideSurfacePivotCount, 'clienttemplates.js');  
  3.     function overrideSurfacePivotCount() {  
  4.         ClientPivotControl.prototype.SurfacedPivotCount = 5;  
  5.     };  
  6. </script>  

Now, upload this file to Site Assets library in SharePoint.

Go to the listview in SharePoint where you would like to see all the Views on the SharePoint Page and then, click on "Edit Page", as shown in the screenshot below.

SharePoint

Click on "Add a Web part" >> Media And Content >> Content Editor and then click on "Add" button, as shown in the image below.

SharePoint

After adding the web part, click on the down arrow and select "Edit Web Part" as shown in the screenshot below.

SharePoint

Scroll to the right of the page and in the Content Link property, paste the link to the txt file that was uploaded to the Site Assets Gallery, namely ShowallViews.txt. Click OK.

SharePoint

Now, you will see all the Views of the SharePoint List horizontally.

Summary

In this article, we discussed how we can show all list views horizontally as out of the box we can only see two list views.