Help

Re: Currency Format in Email

Solved
Jump to Solution
1977 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Sharon_Visser
7 - App Architect
7 - App Architect

I have a field defined as Currency however when I add that field to the Message section of an email that I am creating from an Automation, the value does not appear as Currency. It does have the decimal point for the cents, and I can easily add “$” as part of the preceding text, but I would really like to see the commas that are part of the defined format on the field. Any ideas?
Currency in Table Currency in Email

13 Replies 13

Hi @AlliAlosa @ thanks for this awesome code and example base!

Congratulations on your willingness to help. Your formula worked very well but we continue to have problems with values ​​below 1,000.

We are in a difficult situation here. I have a lot of difficulty understanding the code and no ability to delve deeper into Java Script.

Could you please tell us how we could correct this point or suggest other possibilities that could format values ​​in a simple $ 9.999,99 / $ 999,99 ?

Thank you very much in advance.

Lu
6 - Interface Innovator
6 - Interface Innovator

The best way to do this is with the same kind of script step as in the accepted solution, but use Intl.NumberFormat as per my answer in another thread.

@Camanzi  I also updated my formula version so that it handles negative values and amounts less than 1 currency unit. You would need to change the currency from "$" to "R$ " and then swap the commas and decimal point.

this is giving me a blank in my email automation any idea why that might be? 

Lu
6 - Interface Innovator
6 - Interface Innovator

Use console.log(...) at various points in your script to check the values of your input and output variables when testing it.

Post a new help question if you continue to have trouble, unless you can contribute more information that will help others resolve the original problem.