Currency field issue | Community
Skip to main content
Level 4
June 5, 2024
Solved

Currency field issue

  • June 5, 2024
  • 2 replies
  • 2152 views

Hi Community, 

 

I have a currency field that isn't displaying the way I'd expect it to.  For example, if the populated value is "$300.50" and I use a token to display it in my email content, it shows up as "$300.5"

 

Also, if the field value is supposed to have a comma, that won't show up in my email either - "$1,450.00" as the field value displays in my email's token as "$1450"

 

What are my options for forcing Marketo to display zeros and commas as you would normally expect for U.S. currency?

 

Thanks!

 

 

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 SanfordWhiteman

Check all my posts about Velocity $number.format (in a Velocity {{my.token}} of course).

 

In this specific US case you can use the shortcut $number.currency($lead.field) because the default locale is en-US.

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
June 5, 2024

Check all my posts about Velocity $number.format (in a Velocity {{my.token}} of course).

 

In this specific US case you can use the shortcut $number.currency($lead.field) because the default locale is en-US.

duaneleem
Level 2
June 5, 2024

This is an even cleaner method. Thanks, Sanford!

duaneleem
Level 2
June 5, 2024

Velocity scripting should help with that:

 

## Format the revenue value with a dollar sign and two decimal places ${number.format("$,${esc.h}${esc.h}0.00", 3000.5)}

 

Replace the 3000.5 with the email's token.  I used the NumberTool.  See screenshot of results