+ Start a Discussion
PuranKishorePuranKishore 

Using Multiple Picklist Selecting Multiple Colours

IMAGE( CASE( Select_Multiple_Color__c ,
"Ash", "/resource/1362722614000/Ash",
"Black", "/resource/1362722679000/Black",
"Blue","/resource/1362722424000/Blue",
"Brown","/resource/1362722932000/Brown",
"Green","/resource/1362722445000/Green",
"Grey","/resource/1362722714000/Grey",
"Orange","/resource/1362722639000/Orange",
"Pink","/resource/1362722482000/Pink",
"Red","/resource/1362722574000/Red",
"Violet","/resource/1362722905000/Violet",
"Yellow","/resource/1362722509000/Yellow") ,"ColorImages")

@anilbathula@@anilbathula@
Hi PuranKishore,

try this formula field

IF(INCLUDES(Select_Multiple_Color__c, "Ash"),IMAGE( "/resource/1362722614000/Ash","Ash",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Black"),IMAGE( "/resource/1362722679000/Black","Black",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Blue"),IMAGE( "/resource/1362722424000/Blue","Blue",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Brown"),IMAGE( "/resource/1362722932000/Brown","Brown",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Green"),IMAGE( "/resource/1362722445000/Green","Green",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Grey"),IMAGE( "/resource/1362722714000/Grey","Grey",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Orange"),IMAGE( "/resource/1362722639000/Orange","Orange",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Pink"),IMAGE( "/resource/1362722482000/Pink","Pink",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Red"),IMAGE( "/resource/1362722574000/Red","Red",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Violet"),IMAGE( "/resource/1362722905000/Violet","Violet",10,10),Null)+
IF(INCLUDES(Select_Multiple_Color__c, "Yellow"),IMAGE( "/resource/1362722509000/Yellow","Yellow",10,10),Null)
GulbargaGulbarga

HI! I am new to salesforce. I tried practising with this formula but its not working.

The image is not getting displayed. There are no errors in the formula.

 

Why have you used + here? 

Can you please help me find my mistake?

 

this is the formula I have used:

IF(INCLUDES(Select_Multiple_Color__c, "Ash"),IMAGE("/resource/1362771946000/ash","Ash",10,10),TEXT(11))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Black"),IMAGE("/resource/1362771973000/black","Black",10,10),TEXT(12))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Blue"),IMAGE("/resource/1362772005000/blue","Blue",10,10),TEXT(13))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Brown"),IMAGE("/resource/1362772047000/brown","Brown",10,10),TEXT(14))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Green"),IMAGE("/resource/1362772068000/Green","Green",10,10),TEXT(15))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Grey"),IMAGE("/resource/1362772095000/grey","Grey",10,10),TEXT(16))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Orange"),IMAGE("/resource/1362772138000/orange","Orange",10,10),TEXT(17))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Pink"),IMAGE("/resource/1362772169000/Pink","Pink",10,10),TEXT(18))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Red"),IMAGE("/resource/1362772206000/Red","Red",10,10),TEXT(19))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Violet"),IMAGE("/resource/1362772238000/Violet","Violet",10,10),TEXT(20))+ 
IF(INCLUDES(Select_Multiple_Color__c, "Yellow"),IMAGE("/resource/1362772269000/Yellow","Yellow",10,10), TEXT(21))

 

Here, when the IF condition fails then the number will be displayed. The problem in the above formula is:

 

1. When ever I select a value in the picklist the image is not getting displayed even when the if statement is true.

 

@anilbathula@@anilbathula@

Hi Gulbarga,

 

I think your not getting the images because you didnot store the images in static resources.

Store the images in static resorce and check once.

If image is not appearing then you want to display text then use this:-

IF(INCLUDES(Select_Multiple_Color__c, "Ash"),IMAGE("/resource/1362771946000/ash","Ash",10,10),TEXT(11)

IF(INCLUDES(Select_Multiple_Color__c, "Ash"),IMAGE("/resource/1362771946000/ash","11",10,10),NULL)

I used + symbol because for concatenation of flags.