+ Start a Discussion
yazid akki 15yazid akki 15 

i won't to display any picture or text in other case

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 shadow pictureshadow when it’s 2 or other .

Any idea Please?
SonamSonam (Salesforce Developers) 
If you have a condition according to which you wish to show different images, you need to use the IF statement as shown in the below sample:

<apex:image style="height:60px;width:60px;" value="{!IF(DealMapWrapper[d].flag ,('/servlet/servlet.FileDownload?file='+DealMapWrapper[d].icon),$Resource.GenericFish)}" />