0

I need to display images in a SharePoint 2013 list based on the following criteria:

If 'Member' Column = yes then display Green tick icon (URL listed below)

If 'Member' Column = no then display red cross icon (URL listed below)

I need some assistance with my Formula based on the first criteria only and it keeps producing errors:

="<DIV><imgsrc='"&IF[Member]="Yes","http://isourcedev.walfs.local/sites/wfin/SiteAssets/Tick%20Green%20Circle.png"))&"'></DIV>"

I would appreciate some help with the syntax as I am very new to this and think its to do with lack of brackets etc.Thanks in Advance.

SharePoint user.

Ankitkumar Malde
  • 1,473
  • 14
  • 28
SharePoint
  • 3
  • 2
  • 3

1 Answers1

0

You Can try this code to achieve your functionality:

="<div><img style='float: left' src='http://isourcedev.walfs.local/sites/wfin/SiteAssets/"
&IF(Member="Yes"
;"Tick%20Green%20Circle.png"
;IF(Member="No"
;"Tick%20Red%20Circle.png"
)
)
&"'></div>"

Source: Images in calculated columns

Also you can try this code if your choice is restricted to Yes/No :

="<DIV><img src='http://isourcedev.walfs.local/sites/wfin/SiteAssets/"&IF([Completed?], "Tick%20Green%20Circle.png", "Tick%20Red%20Circle.png")&"'></DIV>"

Source: Using a Calculated Column to show Images

If You need empty for Member = No

=IF([Member?], "<DIV><img src='http://isourcedev.walfs.local/sites/wfin/SiteAssets/Tick%20Green%20Circle.png/><DIV>", "")
Ankitkumar Malde
  • 1,473
  • 14
  • 28
  • Thank you very much for responding. I realised just before I read your post that I needed a space between img src which solved the issue for me so thankyou for confirming this. But I need to add another criteria to the formula to say if 'Member' = no, then blank (we don't want an image in there). How do you add blank to the formula? – SharePoint Feb 08 '17 at 04:51
  • Have added formula for Member=No in my answer.. – Ankitkumar Malde Feb 08 '17 at 05:50
  • Hi. Thank you - you have been very helpful so far. I need some further assistance please on how to combine the two criteria (Yes = image and No = blank or no image into the one formula). So far I have this formula for yes (which works) so can you please complete the formula for me with both criteria added in there: – SharePoint Feb 09 '17 at 02:50
  • And I also want to centre the symbol (image). Is that just: style='float: centre' – SharePoint Feb 09 '17 at 02:55