Skip to main content
Question

Contains and IsNull formulas - is "=true" necessary

  • June 16, 2020
  • 0 replies
  • 60 views

Are both of these correct and will result in the same outcome? For me they do.
Somewhere I saw the B version with the =true.
I suddenly started wondering about it for some reason - tests fine but wanted to know if there was any best practice regarding Contains.
Same thing for IsNull - does that need =true from a best practice standpoint?

A. If(Contains([TESTFIELD], "Yes"), true, false)

B. If(Contains([TESTFIELD], "Yes")=true, true, false)



------------------------------
Ruby Kapil
rubykapil@wi-finity.com
Wi-Finity, Inc
------------------------------

AdamKeever1
Forum|alt.badge.img+2
  • Registered
  • June 16, 2020
I believe the formula evaluates as true by default Ruby. So both are correct, but B is not necessary.

Here is a link to  further information on all of the current Quick Base formulas including sample formulas:
link

------------------------------
Adam Keever
------------------------------

  • Registered
  • June 16, 2020
You can also do just:

Contains([TESTFIELD], "Yes")

Which will work as well. As Adam said it defaults to true. So if TESTFIELD contains "yes" it will be true, if not it is false. You can test that with a formula checkbox. If you need to flip the conditions for whatever reason then you can include the True and False in there too.