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
Gwen ONeill 9Gwen ONeill 9 

Images or Flags

I'm trying to make our at-risk groups more visible and have been given multiple parameters.  In one case they would like a flag of red,yellow, or green based on the date time frame.  I created a checkbox to confirm over 180 days, over 90 days and under 30 days.  I tried to make one formula to cover all 3 options, but I'm receiving an error.  Looking for some suggestions...  Here's the formula I'm trying to use:

IMAGE(IF( Less_than_3_months__c = True , "/img/samples/color_green.gif",""), "")+
IMAGE(IF( Over_6_Months__c = True , "/img/samples/color_red.gif",""), "")+
IMAGE(IF( Over_3_Months__c = True , "/img/samples/color_yellow.gif",""), "")

Thanks!!
Best Answer chosen by Gwen ONeill 9
AnkaiahAnkaiah (Salesforce Developers) 
Hi Gwen,

try with below code.
IF(Less_than_3_months__c = TRUE,IMAGE("/img/samples/color_green.gif", "Green Flag"),

IF(Over_3_Months__c = TRUE,IMAGE("/img/samples/flag_yellow.gif","Yellow Flag"),

IF(Over_6_Months__c = TRUE,IMAGE("/img/samples/flag_Red.gif","Red Flag"),"")))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​

All Answers

AnkaiahAnkaiah (Salesforce Developers) 
Hi Gwen,

try with below code.
IF(Less_than_3_months__c = TRUE,IMAGE("/img/samples/color_green.gif", "Green Flag"),

IF(Over_3_Months__c = TRUE,IMAGE("/img/samples/flag_yellow.gif","Yellow Flag"),

IF(Over_6_Months__c = TRUE,IMAGE("/img/samples/flag_Red.gif","Red Flag"),"")))

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
This was selected as the best answer
Gwen ONeill 9Gwen ONeill 9
That worked - thanks!  Do you know if it's possible to have a formula identify if one field is red and one is green, that it shoul result in yellow?