Skip to main content
Question

Contains and IsNull formulas - is "=true" necessary

  • Jun 16, 2020 12:56 PM UTC
  • 2 replies
  • 74 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
------------------------------
This topic has been closed for replies.

2 replies

AdamKeever1
Forum|alt.badge.img+2
  • Qrew Commander
  • Jun 16, 2020 1:20 PM UTC
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
------------------------------

  • Qrew Colonel
  • Jun 16, 2020 2:06 PM UTC
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.