This post is a followup to my previous blog post titled, Creating a Stoplight Color Coded Status in a SharePoint List, which was a tutorial using SharePoint 2010. I have been getting a lot of comments on how to create a stoplight color coded status in SharePoint 2013, so I thought I would create a tutorial about it. Obviously a lot has changed between the two versions of SharePoint including the look and feel. I hope you find this updated tutorial useful!

We will use the following status codes:

  • Green = Project is on track
  • Orange = Project is starting to fall behind
  • Red = Project is behind
  • Purple = Project is on hold

Important Note: For the calculated field to work, you will need to make sure that your Status field contains a number, because we will base the color selected on this number.

  1. Navigate to Site Settings -> Site Libraries and Lists.
  2. Click the Create new content link.
    SharePoint2013 Create New List
  3. Click the add an App icon.
    SharePoint2013 Add App
  4. Select the Custom List icon.
    SharePoint2013 Custom List
  5. Type in the name of your new list ‘Project Status Report‘ and click the Create button.
    SharePoint2013 Adding Custom List
  6. Navigate to your new list and click on the edit this list link.
    SharePoint2013 Edit This List
  7. Rename the first column Project, and click the plus sign to add a Text column named Status.
    SharePoint2013 Add Column
  8. Click the plus sign again to add a new column and click More Column Types.
  9. Type in the Column Name Stoplight and select the Calculated column type.
  10. Enter in the following Formula and click the OK button.
    Note: that the formula is selecting the 1st character of the value in the Status Column “LEFT(Status,1)“. If the number in your status field is in a different location you may have to adjust the formula a little to get the correct result. The number in the status column is then used in the CHOOSE() function to determine which color should be used. In our example if the number is 1 then it will be green, if the number is 2 the color will be orange and so on.
    SharePoint2013 Calculated Formula

  11. Enter in some data into the Project and Status fields like the following example:
    SharePoint2013 Project Status Report
  12. Paste in the following code into a .txt file and upload it into your SharePoint Library so that it is accessible to your List View. The JavaScript code was provided via Path to SharePoint.

  13. Go back to your Project Status Report and navigate to Site Settings -> Edit Page.
  14. Click on the Add a Web Part link.
    SharePoint2013 Add a Web Part
  15. Select Media Category, Content Editor Web Part and click the Add button.
    SharePoint2013 Media Content Editor
  16. Move the Content Editor Web Part below your Project Status Report list.
  17. Click the the arrow on the top right of the Content Editor Web Part and click Edit Web Part.
    SharePoint2013 Edit Web Part
  18. Paste in your link to the .txt file you uploaded in step 12 into the Content Link textbox and click Apply.
    SharePoint2013 Content Link
    Note: You will notice that after clicking apply, your stoplight column still displays code. We have one thing that we need to do to adjust the view of our list.
  19. Click on the arrow next to your Project Status Report List and click Edit Web Part.
    SharePoint2013 Edit Web Part
  20. On the Edit Web Part, List View options click Edit the Current View.
    SharePoint2013 List View Options
  21. Reorder the List View columns and put the Stoplight column first.
    SharePoint2013 Reorder List View Columns
  22. Scroll down to the Style options and change the View Style from Default to Basic Table and click the OK button.
    SharePoint2013 List Style

Your Stoplight Color Coded Status List should now display correctly.
SharePoint2013 Stoplight Color Coded Status List

Like this post? Share it!