You need to sign in to do that
Don't have an account?
David_GB
Metrics formula with image
I'm tring to write a formula that calculates the age of a case based on it's priority as defined by TL9000 standards for Fix Response Time (FRT).
Here's the formula that I put together and the it passed the checked syntex but fails to issue a "flag".
IMAGE( CASE ( Priority,
"P2 (Major)", Age__c, "720", "/img/samples/flag_red.gif",
"P3 (Minor)", Age__c, "4320", "/img/samples/flag_red.gif",
"P1 (Critical)", Age__c, "24", "/img/samples/flag_red.gif",
"/s.gif"),
"Priority Flag"
"P2 (Major)", Age__c, "720", "/img/samples/flag_red.gif",
"P3 (Minor)", Age__c, "4320", "/img/samples/flag_red.gif",
"P1 (Critical)", Age__c, "24", "/img/samples/flag_red.gif",
"/s.gif"),
"Priority Flag"
I've even considered doing a stop light so if the case age is for the priority is below the required time it would have a green light. When the work around time expires it would change to yellow and then when the Fix response time (final fix) expires it would then change to red.
I already have work flow rules in place to trigger emails around these guidelines and now I'm just trying to put a cosmetic layer to the page layout.
I already have work flow rules in place to trigger emails around these guidelines and now I'm just trying to put a cosmetic layer to the page layout.
Any idea's?
Code:
IF( AND (Age__c >= 24, ISPICKVAL( Priority , "P1 (Critical)") ), "/img/samples/flag_red.gif",
IF( AND (Age__c >= 720, ISPICKVAL( Priority , "P2 (Major)") ), "/img/samples/flag_red.gif",
IF( AND (Age__c >= 4320, ISPICKVAL( Priority , "P3 (Minor)") ), "/img/samples/flag_red.gif",
"/s.gif"
))),"Formula Flag")
"P1(Critical)", IF((NOW() - CreatedDate) * 24 >= 24, "/img/samples/light_red.gif", "/s.gif"),
"P1 (Critical)", IF((NOW() - CreatedDate) * 24 <= 4, "/img/samples/light_yellow.gif", "/s.gif"),
"P1 (Critical)", IF((NOW() - CreatedDate) * 24 < 24, "/img/samples/light_green.gif", "/s.gif"),
"P2 (Major)", IF((NOW() - CreatedDate) * 24 >= 30, "/img/samples/light_red.gif", "/s.gif"),
"P2 (Major)", IF((NOW() - CreatedDate) * 24 >= 15, "/img/samples/light_yellow.gif", "/s.gif"),
"P2 (Major)", IF((NOW() - CreatedDate) * 24 < 15, "/img/samples/light_green.gif", "/s.gif"),
"P3 (Minor)", IF((NOW() - CreatedDate) * 24 >= 180, "/img/samples/light_red.gif", "/s.gif"),
"P3 (Minor)", IF((NOW() - CreatedDate) * 24 >= 90, "/img/samples/light_yellow.gif", "/s.gif"),
"P3 (Minor)", IF((NOW() - CreatedDate) * 24 < 90, "/img/samples/light_green.gif", "/s.gif"),
"/s.gif"),
"Status Color")
Final Formula - works/looks great!
IMAGE(CASE(Priority,
"P1 (Critical)", IF((NOW() - CreatedDate) * 24 >= 24, "/img/samples/light_red.gif",
IF((NOW() - CreatedDate) * 24 >= 4, "/img/samples/light_yellow.gif",
IF((NOW() - CreatedDate) * 24 < 4, "/img/samples/light_green.gif", "/s.gif"))),
"P2 (Major)", IF((NOW() - CreatedDate) * 24 >= 30, "/img/samples/light_red.gif",
IF((NOW() - CreatedDate) * 24 >= 15, "/img/samples/light_yellow.gif",
IF((NOW() - CreatedDate) * 24 < 15, "/img/samples/light_green.gif", "/s.gif"))),
"P3 (Minor)", IF((NOW() - CreatedDate) * 24 >= 180, "/img/samples/light_red.gif",
IF((NOW() - CreatedDate) * 24 >= 90, "/img/samples/light_yellow.gif",
IF((NOW() - CreatedDate) * 24 < 90, "/img/samples/light_green.gif", "/s.gif"))),
"/s.gif"),
"Status Color")