0

I have emails presenting apartment information, including the price in different currencies.

If it's in EUR or CHF then the € symbol appears after the number. If it's in GBP or USD then the £ symbol appears before the number.

Right now, my AMPscript looks like this, which works for EUR and CHF:

%%=FormatNumber(@monthlyprice,"N0",@currencylocale)=%% %%=v(@currency)=%% %%=v(@pmth)=%%

But how do I modify it so that it works for GBP and USD as well?

So, in my head it would look something like:

IF @CurrencyIsoCode == 'EUR' OR @CurrencyIsoCode == 'CHF' THEN
  SET @price0 = Concat(',FormatNumber(@monthlyprice,"N0",@currencylocale),' ',@currency,')
ELSEIF @CurrencyIsoCode == 'USD' OR @CurrencyIsoCode == 'GBP' THEN
  SET @price0 = Concat(',@currency,' ',FormatNumber(@monthlyprice,"N0",@currencylocale),')
ENDIF

This doesn't seem to work but from what I understand, I can't CONCAT variables like this with a FormatNumber function in between.

Can someone please tell me the best way to

0

1 Answer 1

2

@Greg Beazley You can utilize - FormatCurrency function along with Country locale. You can refer this example for FormatCurrency - https://ampscript.guide/formatcurrency/ And for supported locales please refer - https://help.salesforce.com/s/articleView?id=sf.admin_supported_locales.htm&type=5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .