0

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?

Jay Babcock
  • 21
  • 1
  • 8
st1led
  • 101
  • 1
  • 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 https://sharepoint.stackexchange.com/questions/218102/june-13th-2017-microsoft-blocked-handling-html-markup-in-sharepoint-calculated-f – 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

2 Answers2

0

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

Monica Jagani
  • 3,836
  • 6
  • 32
  • 49
0

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

Gil Roitto
  • 349
  • 1
  • 3
  • 15