Hi Team,
I'm trying to dynamically set the locale in the formatCurrency() function in Adobe Journey Optimizer. Here's a simplified version of what I'm doing:
{%= formatCurrency(10000, "en_AU") %}
Instead of hardcoding "en_AU", I would like to pass a profile attribute (e.g., {{countryCode}} or profile.countryCode) that represents the locale dynamically.
However, when I try to pass an attribute like this:
{%= formatCurrency(10000, profile.countryCode) %}
I receive an error.
Could you please confirm if passing a dynamic attribute for the locale parameter is supported in AJO expressions? If so, what is the correct way to structure this?
@SatheeskannaK @Mohan_Dugganab @AJODev @DavidKangni @Anuhya-Y
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @Ajo_WisdomChase ,
I think we cant give dynamic locales in AJO expressions instead you can code with if else condition with country codes.
I know it is not feasible way to do or add in personalization. if you know the data that how many country codes are included, if you want you can format into if else condition.
Thanks
AJODev
Views
Replies
Total Likes
Hello @Ajo_WisdomChase ,
I think we cant give dynamic locales in AJO expressions instead you can code with if else condition with country codes.
I know it is not feasible way to do or add in personalization. if you know the data that how many country codes are included, if you want you can format into if else condition.
Thanks
AJODev
Views
Replies
Total Likes
Hi @Ajo_WisdomChase,
Was the given solution helpful to resolve your query or do you still need more help here? Do let us know. In case the given solution was helpful, then kindly choose it as the 'Correct Reply'.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies