Need to Assign Empty String to a numeric column?

There has been a long standing head-scratcher, that when you assign “” (the empty string) or " " (Space) to a numeric column, they would assign Zero instead.

I have just worked with AppSheet on trying to implement a small change that would allow “” (empty string) to be assigned as “” to numeric columns. They actually attempted to make this change a little while ago but had to roll it back as it caused backwards compatibility issues. So this change will not be made at this time.

However, there is still a way to return a numeric column to empty string.

You can use NUMERIC("") and DECIMAL("") functions. These functions were pointed out in a post discussing this issue. I thought I would just forward the info on to everyone in the form of a Tip.


By the way, assigning Space, " ", will also assign Zero to numeric column and will do the same when using it in the NUMERIC() and DECIMAL() functions. I, guess afterall, Space is a text value so it doesn’t really make sense to assign it to a numeric column at all (credit to @Marc_Dillon for pointing this out in discussions).

I hope this helps someone!

6 2 196
2 REPLIES 2

Hi @WillowMobileSystems I had a discussion with AppSheet back in 2017 about that.
As I remember, this is also working:

  • NUMBER("")
  • ANY(LIST())
  • Using an IFS() statement

Example
Lets say [Column1] is blank.

  • IF([Column1] = "Text" , [Column2]+0.3 , "")
    Result: 0

  • IF([Column1] = "Text" , [Column2]+0.3 , CONCATENATE(""))
    Result: 0

  • IF([Column1] = "Text" , [Column2]+0.3 , NUMBER(""))
    Result: Blank

  • IF([Column1] = "Text" , [Column2]+0.3 , ANY(LIST()))
    Result: Blank

  • IFS([Column1] = "Text" , [Column2]+0.3)
    Result: Blank (my Favorit)

I’m still learning about this topic. Is your discussion here related to this or are they separate issues?

I have found that I need to change [column name]="" expressions to isblank([column name]) with the new “consistent” setting.

Top Labels in this Space