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.

1
  • Can someone clarify where to put this code please? Thank you. Nov 16, 2019 at 13:50

1 Answer 1

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>", "")
5
  • 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 8, 2017 at 4:51
  • Have added formula for Member=No in my answer.. Feb 8, 2017 at 5: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 9, 2017 at 2:50
  • ="<DIV><img width='24px' height='24px' src='"&IF(Member="Yes","isourcedev.walfs.local/sites/wfin/SiteAssets/…>"
    – SharePoint
    Feb 9, 2017 at 2:51
  • And I also want to centre the symbol (image). Is that just: style='float: centre'
    – SharePoint
    Feb 9, 2017 at 2:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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