Skip to main content
Question

Coding Help

  • December 15, 2021
  • 0 replies
  • 22 views

Hi everyone!

I am asking for someone to help me with a formula - rich text code if possible to color code notifications. To clarify, there will be a start date and 7 days out from that date if the record/task is not completed it will be in yellow. If 10 days have passed and the task is still not completed it will be in orange and in 14 days it will be in red. If the task is completed (checkbox is checked) then the notifications will be turned off for that record. Something as shown below: 

Any and all help is greatly appreciated. Thank you & have a great day!

------------------------------
Amy Tran
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+5
  • Registered
  • December 16, 2021
Amy, I have done something similar by changing the background color of fields based on a project status. You could modify this to show the cleaner "button" look you show using the typical HTML for buttons and just not have it link to anything, but this should give you a start.

var number DaysLeft = ToDays(Today()-[Final Report Due]);

If($DaysLeft<-7, "<div style=\"background-color:GreenYellow;\">"&Abs($DaysLeft) & " Days Remaining"&"</div>",
If($DaysLeft<-1, "<div style=\"background-color:Gold;\">"&Abs($DaysLeft) & " Days Remaining"&"</div>",
If($DaysLeft=-1, "<div style=\"background-color:Orange;\">"&"Report due Tomorrow"&"</div>",
If($DaysLeft=0, "<div style=\"background-color:Yellow; color:IndianRed;\">"&"Report due TODAY"&"</div>",
If($DaysLeft>0, "<div style=\"background-color:white; font-size:15px; font-weight:bold; color:red\">"&"Report OVERDUE"&"</div>")))))

It would end up looking something like this (content does not match formula excerpt above, but format does).  


------------------------------
Oana Toma
------------------------------