Discussions

Expand all | Collapse all

Overwrite a formula when a box is checked

  • 1.  Overwrite a formula when a box is checked

    Bronze
    Contributor
    Posted 07-04-2017 12:41
    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.  RE: Overwrite a formula when a box is checked

    Posted 07-04-2017 12:47
    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>")


  • 3.  RE: Overwrite a formula when a box is checked

    Bronze
    Contributor
    Posted 07-04-2017 12:50
    Ah yes, I rearranged it a bit and this did the trick! Thank you!