Discussions

 View Only
  • 1.  Duration Formula with If Statement and Checkbox

    Posted 05-15-2017 15:52
    I have a duration field that I only want to calculate if a checkbox is checked. I have the following formula but it's still calculating a duration even if the condition isn't met:

    If(ToText([NTO Resolved in Field])="Yes",Days(0),[Contractor Resolved Date]-[Creation Date])

    Can someone help me figure out what I'm doing wrong? 


  • 2.  RE: Duration Formula with If Statement and Checkbox

    Posted 05-15-2017 15:56
    Is your checkbox field [NTO Resolved in Field]?

    If so, try this:

    If([NTO Resolved in Field]=false, null, [Contractor Resolved Date]-[Creation Date])

    ...


  • 3.  RE: Duration Formula with If Statement and Checkbox

    Posted 05-15-2017 15:59
    This did the trick, thank you so so much!


  • 4.  RE: Duration Formula with If Statement and Checkbox

    Posted 05-15-2017 16:01
    For future reference, use TRUE or FALSE without quotes when testing the value of a checkbox


  • 5.  RE: Duration Formula with If Statement and Checkbox

    Posted 05-15-2017 16:06
    I definitely will, thank you!