I'd like to have a Yes/No column that rather than showing the usual text ("Yes"/"No"), shows an icon - say green or red.

I know I can create another column (a calculated one) with a formula that depends on the value the value of the first column, something along these lines

="<center>" & IF([Status]="Yes";"<img src='/_layouts/images/yes.gif' border='0'/>";
ELSEIF([Status]="No";"<img src='/_layouts/images/no.GIF' border='0'/>";

But this solution effectively requires two columns: one for the users to update (the yes/no column), and another that shows the related icon. Is there a way to directly show the icons in the yes/no column?

  • 1
    You have tagged your question with both SharePoint 2010 and SharePoint Online. What plattform/version are you on? – Christoffer Aug 29 '17 at 11:57
  • 1
    HTML tag is blocked in calculated field SharePoint Online sharepoint.stackexchange.com/questions/218102/… – Aashirya Aug 29 '17 at 12:13
  • I am using Sharepoint online, not the desktop version. It is however a rather old version (not Office 365, but SP 2010 I guess, this is why I also initially tagged the question as 2010) – st1led Aug 30 '17 at 11:56

You can use JSLink feature. Edit your list view webpart, add JS link to the webpart to display icon instead of text.

Steps to implement JSLink - refer this blog http://techtrainingnotes.blogspot.in/2015/12/sharepoint-js-link-context-object.html

Similar requirement can be refered from here - JSlink on color coded items


Since you are using SharePoint Online you should use JSON formatting, see these examples: example 1 example 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.