AndreonnaGarret
8 years agoQrew Assistant Captain
Status field for a duration not working properly
I have a duration field called [Contract Down Time]. I would like to put a status on this that would return "Downtime Reported" if there is a value in the field, and "No Downtime" if the field was left blank. I thought I knew how to do this, but it's not working. I have the following formula in the status field:
If(ToText([Contract Down Time])<>"",
"<div class='" & "<b>" & "Downtime" & "</b>" & "' style='padding: 3px 5px; background: #" & "FF1493" & " ; border-radius: 8px; text-align: center; text-decoration: none'>" & "<b>" & "Downtime Reported" & "</b>" & "</div>",
"<div class='" & "<b>" & "No Downtime" & "</b>" & "' style='padding: 3px 5px; background: #" & "E0E0E0" & "; border-radius: 8px; text-align: center; text-decoration: none'>" & "<b>" & "No Downtime" & "</b>" & "</div>"
)
However when I look at one record with downtime and another without, they both have the status "Downtime Reported"
Can someone help me figure out what I have done wrong on this?
Thanks!
If(ToText([Contract Down Time])<>"",
"<div class='" & "<b>" & "Downtime" & "</b>" & "' style='padding: 3px 5px; background: #" & "FF1493" & " ; border-radius: 8px; text-align: center; text-decoration: none'>" & "<b>" & "Downtime Reported" & "</b>" & "</div>",
"<div class='" & "<b>" & "No Downtime" & "</b>" & "' style='padding: 3px 5px; background: #" & "E0E0E0" & "; border-radius: 8px; text-align: center; text-decoration: none'>" & "<b>" & "No Downtime" & "</b>" & "</div>"
)
However when I look at one record with downtime and another without, they both have the status "Downtime Reported"
Can someone help me figure out what I have done wrong on this?
Thanks!