function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RahulRahul 

Hello Friends.Need Help. Require help in correcting a formula

I have a Picklist value named Boolean which has value True or false and null. rif  the value is true Green Image should be displayed, if its false and Null Red image should be displayed. I have writted the Following Formula but getting Error.

IF(ISPICKVAL( boolean__c ='True' , 
IMAGE("/img/samples/color_green.gif", "green", 15, 15), 
ISPICKVAL( boolean__C ='False' , 
IMAGE("/img/samples/color_red.gif", "red", 15, 15),ISPICKVAL(boolean__c == null, 
IMAGE("/img/samples/color_red.gif", "red", 15, 15),IMAGE("/img/samples/color_red.gif", "red", 15, 15) 
))))

Please help
 
Ryan GreeneRyan Greene
ISPICKVAL must be formated like this: ISPICKVAL(picklist_field, text_literal). So your first line should look like this: IF(ISPICKVAL(boolean__c,"True") , 
Also, you are missing the closing paren ')' after each ISPICKVAL
Ryan GreeneRyan Greene
I see you added all the closing parens at the end, this is incorrect. The ISPICKVAL needs the close immediately after the "text_literal"
RahulRahul
Hi Ryan, This code is Working Fine for me.Thank you so much for the Answer :)
IMAGE( 
CASE( Boolean__c, 
"True", "/img/samples/flag_green.gif", 
"False", "/img/samples/flag_red.gif", 
"Null", "/img/samples/flag_red.gif", 
"/img/samples/flag_red.gif"), 
"Priority Flag")