Skip to main content

Hey Zap fans! Nick from the Community team, coming atcha with another Formatter Features article! I’ll be covering number and currency formatting in Formatter by Zapier.

You can't always count on numbers/currency coming into your Zaps with the exact format that you need. 

Today we’ll be looking at the following:

  • Format Number

  • Format Currency

Format Number

This option can be found at:
Formatter by Zapier — Numbers — Format Number

 

What It Looks Like

 

What It Can (and Can't) Do

To make sure you don't go into your Zap with false assumptions, let's briefly cover what is and is not possible with Format Number

Things you can do with this transform option:

  • Choose the format for grouping and for decimal

  • Specify the incoming decimal mark

  • Use line items to format multiple numbers with one Formatter step

 

Things you can not do with it:

  • Make numbers negative/positive based on incoming value

  • Perform mathematical operations

  • Perform rounding or padding of the number

Some Ways to Use It

Format Numbers for Different Countries
There are a whole lotta countries out there, and each one has a different monetary and measurement system.

For example, fifteen thousand three hundred with a decimal of five zero would be written differently depending on the country:

In the United States, Mexico, or the UK, it would be written: 15 300.50 or 15,300.50

In Spain, South Africa, or Brazil, it would be: 15 300,50 or 15.300,50

Format Numbers for Different Applications
Just as there are many countries, there are also many software applications out there! It's entirely possible that you'll encounter one that doesn't like the number format of another app. Use Formatter to make it right!

Anything Tricky About It?

Nothing too tricky about it. Just make sure you specify the correct decimal mark for the incoming number, and that you're aware of which output options you've got:

 

Format Currency

This option can be found at:
Formatter by Zapier — Numbers — Format Currency

What It Looks Like

What It Can (and Can't) Do

Your mind might already be going wild with ideas of how to use this, but let's quickly see what is (and is not) possible with the Format Currency transform.

Things you can do with this transform option:

  • Specify the currency to be used for formatting (USD, EUR, etc.)

  • Specify the locale to be used for the currency formatting (English, Spanish, etc.)

  • Specify the format to be used for the currency formatting (formatting rules can be found here)

  • Use line items to format multiple numbers with one Formatter step

Things you can not do with it:

  • Perform math operations as part of the formatting process

  • Use incoming values that contain currency symbols and/or words ($, USD, US Dollars, etc)

Some Ways to Use It

Format Currencies Dynamically Based on Country
If you've got a trigger app (like eCommerce or a purchase form) that lets users specify the country/region they're in, you could use something like a Lookup Table to then determine which currency, locale and format to use.

PRO TIP: Use Named Variables to output all of the above with a single Lookup Table step.

 


Use After a Math Operation Step That Calculates Exchange Rates
If the input is in one currency but you need to have a final output (for an invoice or receipt, for example) in the person's local currency, you can use a math step to do the conversion then the Format Currency step to add the currency locale, formatting, etc). 

PRO TIP: You can use a Google Sheets step, along with the GOOGLEFINANCE function, to get real-time currency conversion:

 

 

Format Multiple Line Items With a Single Formatter Step
If you have line items and need to format multiple numbers, you can do it with a single Format Currency step:

Anything Tricky About It?

There's nothing terribly tricky about this transform option, aside from making sure you've selected the correct options and have factored in currency conversion in prior steps (if applicable). If something costs $34.99 USD you can't simply change it to £34.99 and make the accounting work. Unless, of course you are actually charging the exact same amount regardless of the currency.

Other Resources

If you’re looking for more information, here are a few places you can look:

Coming Up in the Series

Next up in the Formatter Features series we'll be taking a look at using the Formatter to perform math operations in your Zaps. Until next time!

Would it be possible to strip a currency sign to only get a number as output please?

 

From $100 to 100


Great question, @Jeremyn!

I think the Format Currency transform will add always add in a currency sign in. Are you looking to remove all kinds of currency signs or will it always be one kind of currency sign that needs to be removed?

If it’s always going to be the dollar currency sign that you want to remove, you could try using a Formatter (Text > Replace) step instead:

cdf57d32be0a60eb851521b10cc9b76c.png
Hope that helps! :)


Hey Sam, this will do the job as I was trying to remove only the dollars currency sign.

 

Thank you very much for you quick and helpful answer, I really appreciate!


Reply