Colour code fonts in SharePoint or Project Server (Online or On-Premise) Lists

Hi All, Recently onsite, and a fairly common requirement in either SharePoint or Project Server, is to conditionally format lists. This works for SharePoint or Project Online as well.

In this example, any columns in a list view with ‘High’ ‘Medium’ or ‘Low’ entries, will be coloured Red, Orange or Yellow respectively.

Firstly, it is a good idea to download the JQuery 1.1 Min file from the JQuery site, and pop it into your site assets library. You can download this file from my OneDrive if you like;

http://target=

$(document).ready(function(){
$Text = $(“td .ms-vb2:contains(‘High’)”);
$Text.css(“color”, “#CC0000”);

$Text = $(“td .ms-vb2:contains(‘High’)”);
$Text.css(“font-weight”, “bold”);

$Text = $(“td .ms-vb2:contains(‘Medium’)”);
$Text.css(“color”, “#FF6600”);

$Text = $(“td .ms-vb2:contains(‘Medium’)”);
$Text.css(“font-weight”, “bold”);

$Text = $(“td .ms-vb2:contains(‘Low’)”);
$Text.css(“color”, “#FF9966”);

$Text = $(“td .ms-vb2:contains(‘Low’)”);
$Text.css(“font-weight”, “bold”);
}); ​​​​​​​<br/>

You may want to check the quotations etc are correct when copying and pasting (e.g. ” signs).

Afterwards, your SharePoint or Project list should look something like this;

ListFontColours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s