Oct 14, 2021 03:47 PM
Hi all,
I’m getting crypto prices from the Coinmarketcap API and the prices have 12 decimal places E.g. $0.000000007269
However, when I fetch the prices into Airtable, the field [Prices] has precision set to 1.0000000 - 7 places and missing the remaining 5 places.
Is there a way to resolve this?
Thanks in advance,
Paul
Solved! Go to Solution.
Oct 16, 2021 11:06 PM
One option is to save it into a text field. If you need to use it in any calculations, wrap the field reference in the VALUE()
function to turn it back into a number. To display the result, concatenate it with an empty string to re-stringify it. It’s a few extra steps, but the precision should be maintained (knock on wood; I’ve never done super precise math with Airtable formulas, so I recommend running tests to ensure that this process will work for your use case).
Oct 17, 2021 02:30 PM
A number/currency field is capable of storing a number with 12 decimal places if you set the value via scripting API. However, the user interface will not show these additional decimal places. You can see that the extra decimal places are stored in the editable field by using a formula field to convert the value to a string (e.g. {price} & ""
).
Oct 16, 2021 11:06 PM
One option is to save it into a text field. If you need to use it in any calculations, wrap the field reference in the VALUE()
function to turn it back into a number. To display the result, concatenate it with an empty string to re-stringify it. It’s a few extra steps, but the precision should be maintained (knock on wood; I’ve never done super precise math with Airtable formulas, so I recommend running tests to ensure that this process will work for your use case).
Oct 17, 2021 02:30 PM
A number/currency field is capable of storing a number with 12 decimal places if you set the value via scripting API. However, the user interface will not show these additional decimal places. You can see that the extra decimal places are stored in the editable field by using a formula field to convert the value to a string (e.g. {price} & ""
).