Sep 27, 2020 07:02 AM
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?
Solved! Go to Solution.
Sep 24, 2023 04:35 AM
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.
Sep 26, 2023 08:46 PM
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.
Nov 17, 2023 01:31 PM
this is giving me a blank in my email automation any idea why that might be?
Nov 19, 2023 05:34 PM
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.