2

I was wondering if it is possible to display another picture in case the picture is empty.

I tried this formula but is not working, any ideas?

IF(ProductImage3__c != null, 
  IMAGE("http://images.domain.com"+"/"+ProductImage3__c, Name,200,200), 
  IMAGE("http://images.domain.com"+"/"+ProductImage2__c, Name, 200,200)
)
3

2 Answers 2

1
  1. You only have 1 underscore for ProdctImage3_c, so it won't compile, for one.
  2. Use ISBLANK instead of != Null, it's a friendlier way of checking for nulls.
  3. You don't need a separate + "/" +, just include that as part of your URL string.
  4. You may want to add some default image in case ProductImage2__c is null.

I've tested the following formula out on my dev org, which works:

IMAGE(
    "http://images.domain.com/" +     
    IF(
        ISBLANK(ProductImage3__c),
        ProductImage2__c,
        ProductImage3__c
    )
    ,Name
    ,200
    ,200
)
1
  • James, thank you! it works just fine. Thank you for your time.
    – Carlos
    Commented Mar 11, 2014 at 17:51
0

Are you seeing no image? What is the error you see?

Your formula seems to be right, one suggestion I can point you towards is make sure you

treat blank fields as blanks than zeros

since you are using image on a text formula.

2
  • 1
    Good to see you back buddy :) Commented Mar 11, 2014 at 17:24
  • 1
    Thank you man ! I will try your solution and let you know
    – Carlos
    Commented Mar 11, 2014 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .