Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Need to use num.currency display pattern and still have decimals show.

jaretf56184102
Level 1
Level 1

I have a decimal field in a form that I need to format as a currency field.  I am using the num.currency display pattern and this works great since it will format the $ sign to the front or back depending on the language being English or french.  The only problem is that I have a requirement to always display the decimal places even if they are 0.  So for instance I need to show 200.00 as $200.00 if the language is English and 200,00$ if the language is French.  I have tried a display pattern of num.currency{$zzzzzzzzzzzz9.99} but it will only show $200 in english and 200$ in French.

Thanks

2 Replies
uabhiram
Level 2
Level 2

You have to use num{($zzzz9.99)} display pattern which shows as $1234.21.

jaretf56184102
Level 1
Level 1

num{($zzzz9.99)} will always show the decimals but it will always keep the $ in the front even if the language is set to french.  That is why I want to use num.currency instead.  I need the $ to show at after the number if the language is set to french.  num.currency will do this but it does not show the 200 as $200.00 but instead shows it as $200.  It will show 200.21 as $200.21 though.