1

I have two images that are both located in my site assets folder and I want to show the two images based on when a source column returns "yes" or "no".

I have a wrapped around a nested if statement and the only results I'm getting is the first image, "yes.png". Even if the source column displays "no" the calculated column returns the "yes.png" image.

Example:

="<DIV> <IMG src='/SiteAssets/yes.png'"&IF([Source Column]= "Yes", "yes.png",IF([Calculated Column]= "No", "no.png"))&"'> </DIV>

And if I leave IMG src as just /SiteAssets then I only get these:

enter image description here

1 Answer 1

0

Try using below formula:

="<div><img src='/sites/<site-name>/SiteAssets/" & IF([Source Column] = "Yes", "yes.png", "no.png") & "'></div>"

Microsoft documentations:

  1. Calculated Field Formulas
  2. Examples of common formulas in lists

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.