In a column set to type Decimal, with 2 decimal places, a formula that boils down to CONTAINS(2018.52,2018.5) is evaluating to TRUE.
Expected behaviour would be FALSE, as 2018.52 and 2018.5 are two different decimal numbers.
Workaround or fix?
Cheers!
Solved! Go to Solution.
IN() is your best choice to find whether a value is occurs within a list. Unfortunately, your options for checking whether a particular substring occurs within another string are limited.
Why do you need CONTAINS - canโt you just use [Col1]=[Col2]?
nope, the formula parses a list of values and looks for a specific value in that list. the above is just a simplification of a case that is returning true and it shouldnโt.
I worked around it by using IN() instead of CONTAINS(). Still, it appears CONTAINS() is bugged and does not currently support decimals.
CONTAINS() is a text function and converts its arguments to text if not already so. โ2018.52โ does, in fact, โcontainโ โ2018.5โ in that it is the first 6 characters of the other. CONTAINS() is not equality.
+Steve Coile Interesting. Is there an article on the CONTAINS() function explaining this? Doesnโt seem to be one in the support site.
Also, to parse a list of numbers and check whether it contains something, would you use IN() as well or something else?
Documentation is lacking, but (coincidentally) Iโm working on it.
IN() is your best choice to find whether a value is occurs within a list. Unfortunately, your options for checking whether a particular substring occurs within another string are limited.
+Steve Coile Cheers. A support article on IN() would also be nice.
User | Count |
---|---|
16 | |
13 | |
8 | |
7 | |
4 |