Home >Tips >SharePoint Workflows >Version history button kalmstrom.com site map icon Site map  

Library Version History Button

A SharePoint Workflows tutorial by Peter Kalmström

SharePoint Designer iconVersion History is a SharePoint feature that makes it possible to track changes in items and files and restore earlier versions.

Sometimes it is convenient to have icons with  links to the version history of each item directly in a list or library. Such a button can be created and kept up to date with a workflow. The idea behind this workflow can of course also be used for other SharePoint buttons.

For a list, you just have to create a new multiple lines of text column with enhanced rich text in the SharePoint list you want to use. Then you can start building the workflow.

For a library, you must use SharePoint Designer to create the column, because a multiple lines column with enhanced rich text cannot be created from SharePoint.
Version History icons

In the demo below Peter Kalmström, CEO and Systems Designer of kalmstrom.com Business Solutions, shows how to first create a new multiple lines of text column with enhanced rich text in a library. After that, he describes how to build the workflow that adds version history buttons to each file in the library.

Create column

  1. In SharePoint Designer, select Lists and Libraries in the left pane.
  2. Click on the library where you want to add the new column to open its summary page.
  3. Click on Edit Columns in the ribbon.
  4. Click on the Add New Column? button in the ribbon.
  5. Select the Multi Lines of Text option from the dropdown.
  6. Click once on NewColumn1 and give new column a more appropriate name.
  7. Double-click on the column row to show the properties. Check the box for Enhanced Rich Text.

Version history button workflow

  1. Create a list workflow for the library that starts when an item is changed. Go to the end of the workflow.
  2. Add the Action Update Item'. Update the new column with a link that is built from the current site URL from the workflow context + _layouts/15/Versions.aspx?list= + the list ID + a lookup for the ID of the current item.
  3. Add the image link. The image should be kept in the Site Asset of the same site as the library.

    The result should be like this (add your own values at bold text):

    <a href="
    [%Workflow Context:Current Site URL%]_layouts/15/Versions.aspx?list=LISTID&ID[%Current Item ID%]" target="_blank"><img src="IMAGEURL"></a>
  4. Check, publish and test the workflow.

Follow kalmstrom.com on LinkedInFacebook or Twitter!

back icon next icon

Products Buy FAQ Services Tips Books Contact About Us Tools

Security and integrity

Copyright  Kalmstrom Enterprises AB  All rights reserved