Skip to main content

Hi all,



Might be a rookie mistake but I have a formula with this:


IF(DATETIME_DIFF(TODAY(), {Full-date}, ‘days’)>10,1,0)



It is set to integer but despite this the API is Number or String, causing other problems such as having to put my API request in “1”. Other fields that are set to integer is simply Number in the API. Any way to force the formula to be number or am I making some other mistake?



Jacob





Any thoughts on what I am missing? 🙂


Any thoughts on what I am missing? 🙂


Seems like a bug. I would report it to support@airtable.com, but I wouldn’t hold your breath on them fixing it. They’re very bad about responding to bug reports & feature requests.



However, is it really causing a problem? I’ve been using the API with formula fields that result in integers for years, and I’ve never had a problem. I’ve also never needed to wrap my numbers in quotation marks.


Will give it a try 🙂



I will give it a shot again but that is what fixed it and assumed it was connected with that. Another field that was Integer only didn’t have that issue…


Will give it a try 🙂



I will give it a shot again but that is what fixed it and assumed it was connected with that. Another field that was Integer only didn’t have that issue…


Yeah, if that fixed the issue for you, then I would just run with it. What I meant above is: is it really a problem if you have to put quotations around the number 1? I haven’t had to do it on my end, but if you need to do it on your end, it doesn’t sound like it’s that big of a deal, no?


Yeah, if that fixed the issue for you, then I would just run with it. What I meant above is: is it really a problem if you have to put quotations around the number 1? I haven’t had to do it on my end, but if you need to do it on your end, it doesn’t sound like it’s that big of a deal, no?


It is doable and solves it, but it just goes against my gut feeling of solving it in Airtable instead 🙂


You could try dropping the surrounding IF() function, and just use this:



DATETIME_DIFF(TODAY(), {Full-date}, 'days') > 10



A condition on its own automatically returns 1 for true, 0 for false.


You could try dropping the surrounding IF() function, and just use this:



DATETIME_DIFF(TODAY(), {Full-date}, 'days') > 10



A condition on its own automatically returns 1 for true, 0 for false.


Just tried it and unfortunately not. Even tried creating a new column and same issue there. Output in API documentation is either Number or String…?



Reply