Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jul 15, 2022 08:30 AM
Hi Folks,
I have a Zapier Zap that is working beautifully to create invoices in Craftmypdf and then email them, but I have noticed a problem.
The Airtable view I get the data from has a rollup field that is a sum of charges in another table, a currency filed that contains any money due from previous months and a formula filed that adds those 2.
In Zapier I use the dictionary function to assign the value in the field Due to a key, also named due but the value is no longer 51.90 but 51.900000000000006
Is Airtable passing this or is Zapier corrupting it? What can i do about it?
Solved! Go to Solution.
Jul 15, 2022 08:54 AM
Hey @Dave_Martin!
So everything you’re seeing is working as intended.
The true number value of your Due
field is in fact 51.900000000000006
.
Airtable is just formatting that number value into a currency format, which brings it down to the 51.90
that you’re seeing.
All things considered, the solution is pretty simple.
I dusted off Zapier and popped it open to play around with the problem you’ve been having.
Add a new action using the Formatter.
You’ll want to use the Format Currency transform action under the Number category.
Input your Due
value, and then set the formatting you’d like to have Zapier output to Craftmypdf.
That should force the formatting to remain in a currency format of your choice.
Lemme know if I’m missing something or if you have any questions about what’s happening.
Jul 15, 2022 09:09 AM
@Dave_Martin Your actual value is the one that you are seeing in Zapier. If you don’t want to see that value, then just use the ROUND() function in an Airtable formula field to round the value to however many decimal points that you want (presumably 2). Then send that formula field to Zapier instead.
Jul 15, 2022 08:54 AM
Hey @Dave_Martin!
So everything you’re seeing is working as intended.
The true number value of your Due
field is in fact 51.900000000000006
.
Airtable is just formatting that number value into a currency format, which brings it down to the 51.90
that you’re seeing.
All things considered, the solution is pretty simple.
I dusted off Zapier and popped it open to play around with the problem you’ve been having.
Add a new action using the Formatter.
You’ll want to use the Format Currency transform action under the Number category.
Input your Due
value, and then set the formatting you’d like to have Zapier output to Craftmypdf.
That should force the formatting to remain in a currency format of your choice.
Lemme know if I’m missing something or if you have any questions about what’s happening.
Jul 15, 2022 09:09 AM
@Dave_Martin Your actual value is the one that you are seeing in Zapier. If you don’t want to see that value, then just use the ROUND() function in an Airtable formula field to round the value to however many decimal points that you want (presumably 2). Then send that formula field to Zapier instead.
Jul 15, 2022 09:44 AM
Wonderful, thanks for your help. Can’t fathom how I arrived at 51.900000000000006 but nice easy fix
Jul 15, 2022 09:45 AM
Thanks, Scott :thumbs_up: :thumbs_up: :thumbs_up: :thumbs_up: