Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
Rahul Luthra 1

# Case Flag Formula field - Update post status change to Closed-Resolved

Hi Team,

There is a field which flag the case to green till 24 hours from creation date and flag red after 24 hours.I want to update the formaul so that the flag turns to white once the case status change to close - Resolved.

As per my understanding this requires multiple IF statement. Could someone please guide in modifying the below formula:

IMAGE

IF((FLOOR((NOW() - CreatedDate)*24) < 24) && ISPICKVAL(\$User.User_Country__c,"India") ,"/img/samples/flag_green.gif", "/img/samples/flag_red.gif"), "", 15,15)

TIA
Best Answer chosen by Rahul Luthra 1
Ajay K Dubedi
Hi Rahul,
Try the following formula, it may be helpful for you:
IF(ISPICKVAL(Status,"close - Resolved"),IMAGE("s.gif", "white", 15, 15),
IF(FLOOR((NOW() - CreatedDate)*24) < 24,
IMAGE("/img/samples/color_green.gif", "green", 15, 15),
IF(FLOOR((NOW() - CreatedDate)*24) > 24,
IMAGE("/img/samples/color_red.gif", "red", 15, 15),
'')))
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi

Ajay K Dubedi
Hi Rahul,
Try the following formula, it may be helpful for you:
IF(ISPICKVAL(Status,"close - Resolved"),IMAGE("s.gif", "white", 15, 15),
IF(FLOOR((NOW() - CreatedDate)*24) < 24,
IMAGE("/img/samples/color_green.gif", "green", 15, 15),
IF(FLOOR((NOW() - CreatedDate)*24) > 24,
IMAGE("/img/samples/color_red.gif", "red", 15, 15),
'')))
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi

This was selected as the best answer
Rahul Luthra 1
Thanks alot Ajay.
It worked :-)