Forum Discussion

MaryPerkins's avatar
MaryPerkins
Qrew Trainee
4 years ago

simple formula

Hey All,

I've a formula Numeric Formula field that calculates Units Remaining

[Weekly Units]-[# Units Used]

This works. Now I'm trying to create a message if this field goes NEGATIVE. 

if (([Weekly Units]-[# Units Used])<0, ToText("TOO MANY UNITS USED, TRY AGAIN"),
if (([weekly units]=[# units used]),"zero",
([weekly units]-[# units used]))))

I'm receiving a Formula Syntax Error for the last line: "Expecting Text but found Number". If this is a formula NUMERIC field, why am I getting this message?

Here are other variations that I've tried for that last  line, but still get the same message:

(ToNumber([weekly units])-ToNumber([# units used]))))

(ToNumber([weekly units]-[# units used]))))

Thanks in advance! Mary


------------------------------
Mary Perkins
M3TR1CS Business Solutions
mary.perkins@m3tr1cs.com
------------------------------

3 Replies

  • Mary -

    Were able to find a solution for this? If not, you'll need to convert the field to a Formula Text field rather than a Formula Numeric field. Since your formula is a Formula Numeric, you can't have any text options for the 'Else' part of your formulas.  OR If you would just like to produce errors for your users, you can also use this formula in the Business Rules section for your table:



    ------------------------------
    Blake Harrison
    bharrison@datablender.io
    DataBlender - Quick Base Solution Provider
    Atlanta GA
    404.800.1702 / http://datablender.io/
    ------------------------------
    • MaryPerkins's avatar
      MaryPerkins
      Qrew Trainee
      Hi Blake,

      Thanks for reaching out. I did not get my formula working yet. However, I did use your suggestion to use the Business Rules section of the table. I either forgot or never new it was there. I just started building 6 months ago...  With using the business rules working, I don't necessarily need the longer formula and am working on the rest of that now.

      Thanks for your help. It was a tremendous move forward for me. :) 

      Cheers, 

      Mary Perkins
      ColoradoBiz.net LLC
      DBA M3TR1CS Business Solutions
      mary.perkins@m3tr1cs.com
      ----------------
      Cell: 720-272-1268




      • BlakeHarrison's avatar
        BlakeHarrison
        Qrew Captain
        Great to hear!

        ------------------------------
        Blake Harrison
        bharrison@datablender.io
        DataBlender - Quick Base Solution Provider
        Atlanta GA
        404.800.1702 / http://datablender.io/
        ------------------------------