Friday, July 31, 2015

Display more than three views in SharePoint 2013 library or list

A few weeks back, a coworker asked me to expand the number of views shown in a SharePoint list. SharePoint shows only the first three view links by default, but includes ellipses (three dots) to expand the selection of views available (as shown below).




I had heard that it wasn't possible to change this setting, so I informed my co-worker, unfortunately, we can't do anything about it.

But as usual, I hate giving the "It's not possible" answer, so I started to dig into the issue and see if someone had a solution. Lo and behold, someone had! Thanks to Aveenav who posted the answer on SharePoint StackExchange.

If you're familiar with SharePoint 2013, implementing the solution is relatively straightforward. However, I've included instructions below to help the rest of us out.

1.  Go to the list or library where you want to see additional views.
2.  In the upper right corner of the page, click the cog and select Edit Page.


3.  Click Add a Web Part in the main window area.

4.  In the webpart Categories, scroll down and select Media and Content. Select Script Editor and click Add.

5. In the Script Editor, click Edit Snippet.

6. In the Embed window, paste this code.

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

function overrideSurfacePivotCount() {
   ClientPivotControl.prototype.SurfacedPivotCount = 4;
};
</script>

7.  The "4" in the script above determines how many view selections to show. Change this number as needed. Click Insert on the Embed window.

8.  Click Stop Editing in the upper left of the SharePoint ribbon.

9.  Test the views.

I've increased the number of view selections available to 15 and encountered no issues. If the views are extended to the point of going beyond the width of the page, the view selections will wrap to the next line.

Hopefully, this procedure will be handy for you if you get a similar request.



Friday, July 17, 2015

Displaying Images in Excel Based on a Result

If you've worked with me at all, you know that I'm always looking for ways to do things smarter, faster, and more efficient. I recently was challenged with developing a visual status report for a project, and the project manager wanted to use specific icons. Though Excel has a decent selection of icons to use for conditional formatting, the request for specific icons created a challenge for me. Thankfully, I found the following tip from Allen Wyatt. Though the set-up is involved, the time saved will be priceless.

Below is the beginning of my efforts using custom icons.