Forum Discussion

GiuseppeMacri's avatar
GiuseppeMacri
Qrew Captain
6 years ago

Formula fields not calculating

Hey,

I've working on a formula rich text field which displays some warning text depending on if certain fields are null.

when i have this field in a form, all my other calculations seem to fail (including this one) unless all conditions are true. Rather each calculated field without a True value is left with a ??? value.

Anyone know how to fix? QB support doesnt seem to know how.

------------------------------
GMacri
------------------------------
  • Hello GMacri,

    It is hard to tell with the information provided, it may be easier to help you troubleshoot if we had more a description of what the formulas are doing and perhaps a copy of the formula, if possible, and the resulting error/values.  However, if they are numeric calculations, a common problem would be that the check box "Treat blank values as "0" in calculations" in the field properties not being checked would cause calculations to fail.  Beyond that, it is hard to say without more information.



    ------------------------------
    Brandon Drake
    JHI Group
    Monroeville OH
    ------------------------------
    • GiuseppeMacri's avatar
      GiuseppeMacri
      Qrew Captain

      var text Warnings = List("<br>",

      If([Data Element 1]<>"","","Data Element 1"),
      If([Data Element 2]<>"","","Data Element 2")

      If($Warnings <>"", "<span style=\"color:red;font-size:110%; font-weight:bold\">Missing Information:<br>" & $Warnings)

      This is the larger formula, I am not using any checkbox fields for support, only binary numeric fields (aka only values are 0 or 1)

      ------------------------------
      GMacri
      ------------------------------
      • BrandonDrake's avatar
        BrandonDrake
        Qrew Cadet
        Hi GMacri, 

        Is this the exact formula that you are using in the Rich text field?  If it is, it seems as though you are missing some syntax.  I think you would need to add the two highlighted characters to show the end of the List and to end the variable declaration.  This should clear up any errors in the formula, so long as your Data Element fields are of a type that can be compared to "blank" and does not require the isNull() function to be used.

        var text Warnings = List("<br>",

        If([Data Element 1]<>"","","Data Element 1"),
        If([Data Element 2]<>"","","Data Element 2"));

        If($Warnings <>"", "<span style=\"color:red;font-size:110%; font-weight:bold\">Missing Information:<br>" & $Warnings)

        If there are not any errors in the function that you are using, what is the result of this field when used in the live application? This formula seems to work as expected in my test.

        ------------------------------
        Brandon Drake
        JHI Group
        Monroeville OH
        ------------------------------