Help

Number Formatting problem

Topic Labels: Formulas
Solved
Jump to Solution
925 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Hector_J_Carr
5 - Automation Enthusiast
5 - Automation Enthusiast

So im having an awful hard time trying to figure this out. I only need the price in “Monto Texto”, im trying very hard to get only the number but for some reason “Monto2 Cut” is not formatting into number. My other guess was that its the comma that makes it unable to treat it as a currency or number, so I created a third column where I deleted the comma and still no luck.

Any help is appreciated. I just need to be a number to make some calculations.

image

1 Solution

Accepted Solutions
Dominik_Bosnjak
10 - Mercury
10 - Mercury

The problem is that your regex returns a string, not a number. Use VALUE({Monto Texto}) to extract the figures instead of parsing the cells like you are now. And play with the Monto Texto formatting (just double click the field and you’ll see it, you’ll want to set the output to currency) if the commas and periods cause any errors. They might, but I’m on mobile right now so can’t verify.

EDIT: Type errors are some of the most common causes of bugs in all of programming. No-code platforms included.

Basically, 2 and “2” mean different things to computers and while JavaScript and JS-based tech like Airtable formulas coerce types whenever possible (by trying to guess what we want if e.g., we write 50 + ‘$’), computers are still pretty bad at inferring stuff like “two + 5”.

See Solution in Thread

3 Replies 3
Dominik_Bosnjak
10 - Mercury
10 - Mercury

The problem is that your regex returns a string, not a number. Use VALUE({Monto Texto}) to extract the figures instead of parsing the cells like you are now. And play with the Monto Texto formatting (just double click the field and you’ll see it, you’ll want to set the output to currency) if the commas and periods cause any errors. They might, but I’m on mobile right now so can’t verify.

EDIT: Type errors are some of the most common causes of bugs in all of programming. No-code platforms included.

Basically, 2 and “2” mean different things to computers and while JavaScript and JS-based tech like Airtable formulas coerce types whenever possible (by trying to guess what we want if e.g., we write 50 + ‘$’), computers are still pretty bad at inferring stuff like “two + 5”.

OMG! I cant believe it was that easy! I was stuck with this for several hours trying everything.
Thanks!

image

OMG! I cant believe it was that easy!

Typing can be deceptive, but yeah, keep an eye out for that kind of stuff. It gets way more annoying to debug as your setup grows in complexity.

Here’s a meme with a relevant bit of trivia, keep your spirits up. :slightly_smiling_face:

YkR2IcWOE3bytk5rlkk2JVlonCXxSCACGaEK4aVXr8U