Currency Formatting | Community
Skip to main content
Gary_Hagins
New Participant
January 16, 2016
Solved

Currency Formatting

  • January 16, 2016
  • 1 reply
  • 7374 views

So, I've setup our currency format as $10,000.00 (Admin > Location Settings) and I have a variable/token that is a currency. But when I use that currency, it's always formatted as "10000.00" when inserted as a token in an email--no $ or comma. Any ideas how to fix?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by

One way I have fixed this is using email scripting.  I will look into this for you however.  Email scripting can be found here:  developers.marketo.com

1 reply

Accepted solution
January 18, 2016

One way I have fixed this is using email scripting.  I will look into this for you however.  Email scripting can be found here:  developers.marketo.com

Gary_Hagins
New Participant
January 19, 2016

Perfect! That got me exactly what I needed (although I had to figure out which library to use, $number.currency() is easy enough!). For anyone else who's wondering, you just create an email script something like: {{my.Format Currency}} and then just do something like:

## First, covert the variable to currency format

#set($total = $number.currency(${lead.Total_Production__c_contact}))

## Next, check if variable is set. If it's not, set to "$0.00" to avoid showing an unset/blank variable

#if(!$total)

  #set($total = "$0.00")

#end

## Then, for the email output

Total: ${total}<br>

And then place that in your email template where you need it. Done!

April 4, 2016

That script worked great! Just curious - would we need to reference a different library to get rid of the decimal points? (for example $200 instead of 200.00?)