Skip to main content
Solved

Formula not working / just creates an error


Did this topic help you find an answer to your question?
Show first post

28 replies

Forum|alt.badge.img+4
  • Author
  • Known Participant
  • 19 replies
  • September 20, 2021

Strong typing all the way… but would help if the formula documentation was more explicit about this. But thanks again… its also very inconsistent it works with + - but not with * /


Forum|alt.badge.img+4
  • Author
  • Known Participant
  • 19 replies
  • September 20, 2021
Kamille_Parks11 wrote:

Just to reiterate, this is not a bug. You are adding/dividing several strings that look like numbers, but are not actually numbers. This is why you need to use VALUE(). Math operators are intended to work for numbers and not strings, issues that arise from feeding a math-based formula strings instead of numbers are to be expected.


Its very inconsistent behavior an why if thats the case would + work - work - they should not work gif your point was accurate they should all error if they are strings and Integers you cant add strings unless its doing some kind of type conversion in the background and it that case its not doing it for * and /
That level of inconsistency is a poor user experience even if you don’t call it a bug… But thank you for all your help and @Jeremy_Oglesby also


Kamille_Parks11
Forum|alt.badge.img+25
Jason_Nash wrote:

Its very inconsistent behavior an why if thats the case would + work - work - they should not work gif your point was accurate they should all error if they are strings and Integers you cant add strings unless its doing some kind of type conversion in the background and it that case its not doing it for * and /
That level of inconsistency is a poor user experience even if you don’t call it a bug… But thank you for all your help and @Jeremy_Oglesby also


Generally speaking, in programming it is a “safer bet” to add number-adjacent strings than it is to divide (or multiply) them. Essentially, when you use two (or more) string values and try to perform math on them you are forcing Airtable to guess. There is a complicated answer here relating to how Javascript works under the hood but to cut a long story short: the more data you put in the less reliable you likely would have seen even if you used straight addition and no division. You are supposed to turn strings into numbers before performing math on them, whether its addition, subtraction, multiplication, or division.


Reply