Forum Discussion

JoshCollins's avatar
JoshCollins
Qrew Assistant Captain
5 years ago

Help on Formula Error with Numeric vs Boolean

Hello, 

I've written the formula below and in the screenshot.  Basically, If (this & that) is true, then (result 1), otherwise, result 2.)

Quick Base is telling me that it is "Expecting a Boolean but found Number" for the result 2 formula.  I'm not sure why.

Could anyone diagnose this for me?

I've attached a screenshot of the formula and also the error message when saving.

Here is the formula:
If (

[Property - Luxury House Plan] = true and (180+(([Property - Total Heated SqFt]-3500)/50))<180, 180, (180+(([Property - Total Heated SqFt]-3500)/50)),

[Property - Luxury House Plan] = false and [Property - Plan - 2 Year Average Days to Build] < 113, [Property - Plan - 2 Year Average Days to Build],(113+(([Property - Total Heated SqFt]-113)/50))

)

Thanks in advance!

------------------------------
Josh Collins
------------------------------
  • Can you tell us what field type [Property - Luxury House Plan]  is?  Is it a checkbox field type?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • JoshCollins's avatar
      JoshCollins
      Qrew Assistant Captain
      Hey Mark, yes [Property - Luxury House Plan] is a checkbox field.

      ------------------------------
      Josh Collins
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        OK, I see the problem but it's not so much the syntax as the logic that is incorrect.  If this does not give you the result you want, hen i will need to you express your logic in words, and thrn i can try to help with the formula.


        I think what you want is this,

        If (
        // if Luxury = true, then result is at least 180
        [Property - Luxury House Plan] = true, Max(180, 180 + ([Property - Total Heated SqFt]-3500)/50),

        [Property - Luxury House Plan] = false and [Property - Plan - 2 Year Average Days to Build] < 113,
        [Property - Plan - 2 Year Average Days to Build],

        113 + ([Property - Total Heated SqFt]-113)/50)







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