IN() Function Ignoring Empty Values/Strings?

Say I have a List column MyList containing LIST("A", "B", ""). If I check the count, COUNT([MyList]) = 3. So far so good! But if I check IN("", [MyList]) I get FALSE.

Here's the full table of results for LIST("A", "B", "")*

COUNT(LIST("A", "B", ""))
3
IN("A", LIST("A", "B", ""))true
IN("B", LIST("A", "B", ""))true
IN("C", LIST("A", "B", ""))false
IN("",  LIST("A", "B", ""))false
IN(TEXT(""),  LIST("A", "B", ""))false

* There is no difference between using LIST("A", "B", "") vs {"A", "B", ""} vs LIST("A", "B", TEXT("")) etc...

This seems like the wrong result. Is IN() ignoring the blanks in the List param? It should not, since COUNT() does not. Or maybe IN() is ignoring the blank the first param?

I know there are other ways to program this. Currently I'm using the very old school and nearly-illegible

CONTAINS(" , "&[MyList]&" , "," , "&[ValeToMatch]&" , ")

(Yes, I could use a more legible delimiter like "|", but I really don't like having one List column use a non-default delim just to make the the expression in a different column easier to read.)

Is there any way to use IN() to check for the presence of an empty value/string in a List?

0 3 75
3 REPLIES 3

Could you update how those blank values are getting populated in the app? This means in the list LIST("A", "B", "") , how the value "" has got populated?

COUNT(INTERSECT(LIST(""), LIST("A","","D",""))) > 0

may be more legible.

 

OR(IN("", LIST("A", "B", "")), IN(" ", LIST("A", "B", "")))

 

Cheers

Top Labels in this Space