Problem with condition based on whether or not column is empty

I have a real column (one with data in the spreadsheet), called [DW Set aside], that may or may not have text in it. I want to have a virtual column display “None” if the cell is empty but to display the text if it has any. This formula seems to work:

if( len([DW Set aside])=0, “None”, [DW Set aside] )

However, the following did not work:

if([DW Set aside]="",“None”,[DW Set aside])

In regard to this second expression, it always shows “None”, even when the column has text. I wonder why.

Solved Solved
0 2 400
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4

Because the = and <> operators are magical: if the left-hand operand is blank, the result will be TRUE regardless of the right-hand operand. Hence ISBLANK() and ISNOTBLANK().

View solution in original post

2 REPLIES 2

Steve
Platinum 4
Platinum 4

Because the = and <> operators are magical: if the left-hand operand is blank, the result will be TRUE regardless of the right-hand operand. Hence ISBLANK() and ISNOTBLANK().

Thanks! I don’t fully understand the magic, but now I know I need to use

if(ISBLANK([DW Set aside),“None”,[DW Set aside])

By the way, one nice thing about AppSheet expressions is their similarity to commonly used spreadsheet formulas. However, this seems to be one of several instances where something that would work in a spreadsheet will not work in AppSheet. I’ve also noticed that division of one number by another sometimes results in a whole number in AppSheet even though the same calculation would result in a fraction in a spreadsheet (sorry but I can’t remember specifically). Perhaps it would be nice, if it doesn’t already exist already, to have a page that lists such instances where differences between spreadsheet formulas and AppSheet expressions may cause difficulties for app creators.

Top Labels in this Space