How to determine if a list contains an empty value

I need a way to determine if any values returned from a select are blank. So far I have tried using a select statement to return the list of values that I need to check, then surrounding that in a ISBLANK(). I don’t believe this works because the ISBLANK is checking that the whole list is blank but the list returns commas for the separator and or if one value is filled in then it’s not blank. The other method that I tried was using IN(). I did IN("",Select()) and this did not give the desired behavior either. I think with this method, it was the fact that appsheet seems to have some funny interactions with blanks and true false statements.

2 Likes

You could have two select conditions, one that excludes empty values and one that does not. Then subtract the count of the one that excluded empty values from the count of the other one. If your value is greater than one, then your have some blanks. Here’s an expression I tested on an app of mine:

count(select(Kankaku[Translation],true))-count(select(Kankaku[Translation],isnotblank([Translation])))

The table name is “Kankaku” and the record I’m testing for empty values is [Translation].

1 Like

One option is COUNT(SELECT(Table[KeyColumn],ISNOTBLANK([Column])))=0

4 Likes

I thought of that after I posted. I think that’s better because it’s less complicated.

Yes there are many ways to do things but how to find the simplest one… Finding the most complex is much easier :slight_smile:

4 Likes

This line of code, with a few tweaks I made just fixed so many things for me. Months worth of creating roundabout methods to make my app work, fixed all with that line of code. I cannot thank you enough, this was a big day for me.

2 Likes

That’s so exciting to hear. Great job. I love this community. I, like you, take time to read through posts just to see what I can learn.

2 Likes