Forum Discussion

JordanBeatty1's avatar
JordanBeatty1
Qrew Captain
7 years ago

Overwrite a formula when a box is checked

I am currently using the following formula

If(
[Form 7 Due Date] <= 5 and [Form 7 Due Date] > 2, "<div style=\"background-color:Yellow;\">"&[Form 7 Due Date]&"</div>", [Form 7 Due Date] <= 2 ,"<div style=\"color:white; background-color:Red;\">"&[Form 7 Due Date]&"</div>", [Form 7 Due Date] <= 5 and [Form 7 Due Date] > 2 and [Form 7 Completed] = true, "<div style=\"background-color:White;\">Submitted</div>", [Form 7 Due Date] <= 2 and [Form 7 Completed] = true, "<div style=\"background-color:White;\">Submitted</div>", "")
The issue is that when the box is checked it is not changing the field to read submitted. The field changes color properly based on the number, though I don't want it to count infinitely as time goes on. I would like it so the check box [Form 7 Completed] is checked, the field then changes to read submitted.

2 Replies

  • The IF statement processes the tests in the order that they are listed, lpooking for the first est which is true.  Perhaps you want this:


    If(  
    [Form 7 Completed] = true, "<div style=\"background-color:White;\">Submitted</div>", 
    [Form 7 Due Date] <= 5 and [Form 7 Due Date] > 2, "<div style=\"background-color:Yellow;\">"&[Form 7 Due Date]&"</div>", [Form 7 Due Date] <= 2 ,"<div style=\"color:white; background-color:Red;\">"&[Form 7 Due Date]&"</div>", [Form 7 Due Date] <= 5 and [Form 7 Due Date] > 2 and [Form 7 Completed] = true, "<div style=\"background-color:White;\">Submitted</div>", [Form 7 Due Date] <= 2 and [Form 7 Completed] = true, "<div style=\"background-color:White;\">Submitted</div>")