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.

Solved Solved
3 6 2,854
1 ACCEPTED SOLUTION

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].

View solution in original post

6 REPLIES 6

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].

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

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

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.

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.

Top Labels in this Space