Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Calculated Fields not Returning 0 Values

Topic Labels: API
1549 1
Showing results for 
Search instead for 
Did you mean: 

So, here’s another in my long line of small issued in the API. I have simple formula fields in my table that add other columns together. It’s literally field a = field x + field y + field z. When I return field a, the api doesn’t return “0” properly. Instead, I get the most recent non-zero value in the field.

It should look like: It Looks Like:
0 0
0 0
5 5
0 5
1 1
4 4
0 4
0 4
0 4

I’m using the API to generate simple reporting in Google Sheets, so I have apps script turning the api json object into an array of strings. I’ve verified that there isn’t any weird behavior here with 0 values in my implementation of the apps script. The api only does this on calculated fields.

My only idea so far is that the api is treating the 0 value in the calculated field as empty, but I’m not sure that would cause the behavior or what to do if that is the case. Thanks for any ideas.

1 Reply 1

Update: It isn’t just calculated fields. Any field that returns a numeric value through the api won’t return blank or zero values. Instead, as notated above, the api will return the most recent non-zero value in the field . My work around for the moment is setting all zero values to some variation of 0.00001 as well as setting field defaults to the same.