anusha(salesforce developer)

Thursday 15 September 2016

Display icon when formula is true?

I am trying to create a formula that will display an icon depending upon the value of a picklist.  What I've done so far is upload one of the icons to Files (a .png image) and tried to create forumula field that will display it. 


Some possible combinations would be like:

IF(
   ISPICKVAL(Customer_Satisfaction_Level__c, "Red"),
   IMAGE("/img/samples/color_red.gif", "Red", 16, 16),
   IF(
       ISPICKVAL(Customer_Satisfaction_Level__c, "Yellow"),
       IMAGE("/img/samples/color_yellow.gif", "Yellow", 16, 16),
       IF(
           ISPICKVAL(Customer_Satisfaction_Level__c, "Green"),
           IMAGE("/img/samples/color_green.gif", "Green", 16, 16),
           IMAGE("/img/s.gif", "NA")
       )
   )
)

No comments:

Post a Comment