Skip to main content
Provide the following color coding n the formula field via text depending upon the status of the Employee Green – Employee is active Yellow – Employee is active but on Notice Period Red – Employee is inactive (Hint: Use “/img/samles/color_red.gif” and IMAGE function)
3 réponses
  1. 7 août 2019, 08:56
    Hi Sagar,

     

    This sounds like it might be an interview question, so I'd much rather help you find the solution than outright give it to you. The following article has public samples of image formulas: (https://help.salesforce.com/articleView?id=useful_advanced_formulas_image_links.htm&type=5)

     

    Let's look at this one:

    IF( Case_Age__c > 20,

    IMAGE("/img/samples/color_red.gif", "red", 30, 30),

    IF( Case_Age__c > 10,

    IMAGE("/img/samples/color_yellow.gif", "yellow", 30, 30),

    IMAGE("/img/samples/color_green.gif", "green", 30, 30)

    ))

    This formula applies a color according to a Case Age custom field using an IF.

     

    Do you think you could change the conditions in the IF to meet the conditions for your question? You will need to show red if the employee status is inactive, yellow if he's active but on notice period, and green if he's active.
0/9000