Discussions

Expand all | Collapse all

not isNull in an if statement

Jump to Best Answer
  • 1.  not isNull in an if statement

    Posted 13 days ago
    If(
    [Activity Type Code] = "4" and [Analysis Status] = "Complete", 120*[Actual Modeling Hours Required], 
    [Analysis Status]="Complete" and not IsNull([Construction ROM / Scope Estimate]), [Construction ROM / Scope Estimate],
    [Analysis Status]="Complete" and ([Cost/UoM]*[Capacity Regain])>0, ([Cost/UoM]*[Capacity Regain]), 
    [Analysis Status]="Complete" and [Complexity Code]="1", 500, 
    [Analysis Status]="Complete" and [Complexity Code]="2", 1000, 2000)

    For some reason, the code does not reach the 4th line, i.e. it doesn't display the result ([Cost/UoM]*[Capacity Regain]). Instead it displays 0. But if I comment out the 3rd line which has the "not isNull" function, the code evaluates all the lines correctly.

    The 3rd line works but for some reason the code doesn't get past the 3rd line.

    Thoughts? Anything else I could try?



    ------------------------------
    Asish Mathew
    ------------------------------


  • 2.  RE: not isNull in an if statement

    Posted 13 days ago
    The IsNull fuction is not designed to work on text fields.  What field type is
    [Construction ROM / Scope Estimate]​


    If you want to test a text field for blank use

    Trim([my text field])  = ""


     



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: not isNull in an if statement

    Posted 13 days ago
    [Construction ROM / Scope Estimate]​​

    is a currency field. 



    ------------------------------
    Asish Mathew
    ------------------------------



  • 4.  RE: not isNull in an if statement
    Best Answer

    Posted 13 days ago
    uncheck the box on that field that says to treat blanks as zero or else test for zero.  Probably better to just test for = 0

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: not isNull in an if statement

    Posted 13 days ago
    That worked! Thank you!

    ------------------------------
    Asish Mathew
    ------------------------------