Discussions

Expand all | Collapse all

Contains and IsNull formulas - is "=true" necessary

  • 1.  Contains and IsNull formulas - is "=true" necessary

    Posted 28 days ago
    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
    ------------------------------


  • 2.  RE: Contains and IsNull formulas - is "=true" necessary

    Posted 28 days ago
    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
    ------------------------------



  • 3.  RE: Contains and IsNull formulas - is "=true" necessary

    Posted 28 days ago
    Thanks for that confirmation - saves a lot unnecessary typing

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



  • 4.  RE: Contains and IsNull formulas - is "=true" necessary

    Posted 28 days ago
    Edited by Austin K 28 days ago
    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.


  • 5.  RE: Contains and IsNull formulas - is "=true" necessary

    Posted 27 days ago
    Thanks!

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