Forum Discussion

DirkRuana's avatar
DirkRuana
Qrew Captain
5 years ago

Text Formula Field Error

Hello once again.

I am probably looking right at it, but I can't seem to find my formula error.
Please see pop-up message below:


Text Formula Field Error

Formula syntax error

Please check the syntax of your formula. Look for mismatched parentheses, missing quotes, or extra brackets.

If(
[Cost Code]<>"",[Cost Code]
[Cost Code]="",[Building Group Identifier] & [Record ID#])

Your critical scrutiny is appreciated.

Dirk

------------------------------
Dirk Ruana
------------------------------
  • Hi Dirk, 

    You are missing a comma after the second second cost code. You also don't really need the "Cost Code=""".  The first condition you are testing is whether cost code is not blank, so if that is true it will return cost code. If that condition is false, (the false condition being that cost code is blank), it will return [Building Group Identifier] & [Record ID#].

    So you could write it as - if the cost code is not blank, cost code, otherwise building group identifier and record id.
    If([Cost Code]<>"",[Cost Code],[Building Group Identifier] & [Record ID#])

    I hope that helps!
    Katherine

    ------------------------------
    Katherine Carothers
    ------------------------------
    • DirkRuana's avatar
      DirkRuana
      Qrew Captain
      Thank you Katherine!

      ------------------------------
      Dirk Ruana
      ------------------------------