Skip to main content
Hi All,

I need to display a picture in VFPage. In my custom field, I have the formula 

image("/resource/STR_TRIANGLE" & case( IconFlag__c, 1,"", 2,"",'none') ,"",20,20)

I want to display the STR_TRIANGLE picture, if FlowerFlag ==1, if FlowerFlag === 2  or other, there is nothing.

It displayed a dark picture Display any picture or text any 2 or other case  when it’s 2 or other .

Any idea Please?
2 answers
  1. May 21, 2015, 1:40 AM
    I believe you want to use the following formula

     

    IMAGE(

    CASE(IconFlag__c,

    1, "/resource/STR_TRIANGLE",

    2, "/resource/STR_TRIANGLE",

    ""

    ),

    "Icon Flag",

    20,

    20

    )

    This will show the resource (assuming that is the correct path to the resource) if the IconFlag__c field is equal to 1 or 2 and will show nothing if it is not.  You can change that by updating the path in line 5 from an empty string.

    If this is not what you are trying to do, please let me know.
0/9000