Locale PT - Currency Pattern

154 views
Skip to first unread message

andre.fc....@gmail.com

unread,
Mar 23, 2015, 7:00:22 AM3/23/15
to suppor...@runmyprocess.com, Lizete Esteves
We are trying to define the LocalSetting to "pt-PT" and use the #.##0,00 pattern in currency fields. It seems not work.
How must we define and use. Could you help?
Thanks

Bidisha Das

unread,
Mar 24, 2015, 4:07:08 AM3/24/15
to suppor...@runmyprocess.com
Hi,
Do you mean portugese by pt?


You just need to replace the pattern with your own pattern(portugese).


Thanks & Regards
Bidisha

Bidisha Das

unread,
Mar 24, 2015, 8:45:12 AM3/24/15
to suppor...@runmyprocess.com
Hi,
Adding to my previous reply,you just need to replace the code mentioned in the link with the below code to convert currency into portugese:

<#assign tmp=1000000.1246>
<#setting locale = "pt_PT">
Portugese people write integers like: ${tmp?string("#,###")}
Portugese people write decimals like: ${tmp?string("#,##0.00")}
<#setting number_format="currency">
<#setting locale="pt_PT">
Portugese people write currencies like: ${tmp}


Thanks & Regards
Bidisha

andre.fc....@gmail.com

unread,
Mar 24, 2015, 1:33:43 PM3/24/15
to suppor...@runmyprocess.com, Lizete....@ts.fujitsu.com, andre.fc....@gmail.com
Thank you for your help, but i need help about where define the freemaker script with the locale setting. We have a field in web interface that is an "input number" with pattern "#,##0.00" and we need present to user "#.##0,00".Thanks again.

Bidisha Das

unread,
Mar 24, 2015, 3:59:38 PM3/24/15
to suppor...@runmyprocess.com
Hi,
You can define the setting in Process as it is a freemarker script.The above code will convert given currency into portugese currency,so it will replace comma with dot and vice-versa and would represent in Euro(€) . 

Also,I had put a hard-coded number in the above mentioned code(1000000.1246). You need to replace it with your WI field variable where you are entering the currency value. So in your case,it would be <#assign tmp=input number?number>

Let me know if you face any issue.


Thanks & Regards
Bidisha

andre.fc....@gmail.com

unread,
Mar 25, 2015, 6:41:57 AM3/25/15
to suppor...@runmyprocess.com
Hi Bidisha,

I'm trying to use your suggestions, but nothing seems to work.
My scenario is something similar to the RMP example project "Backoffice": http://docs.runmyprocess.com/Developer_Guide/Collection/Collections_BackOffice

So, I don't have a process to define the setting (I guess).
Imagine that I want to add a column "Price" with the pattern "#.##0,00". Is this possible in this scenario?

Thanks for your help again.

Bidisha Das

unread,
Mar 25, 2015, 11:40:18 PM3/25/15
to suppor...@runmyprocess.com
Hi,
The code I gave you works only in process since it is a freemarker code.It is not applicable for Web Interface. Since you don't have a process,so you can use the code in Composite API and then trigger the CAPI from your WI.

You don't need to mention any Pattern for "Price" input. You can keep it Text and enter value in any format you want.

Don't make any changes in the patterns I mentioned in the code:

<#assign tmp=input number?number>
<#setting locale = "pt_PT">
Portugese people write integers like: ${tmp?string("#,###")}
Portugese people write decimals like: ${tmp?string("#,##0.00")}
<#setting number_format="currency">
<#setting locale="pt_PT">
Portugese people write currencies like: ${tmp}


Reply all
Reply to author
Forward
0 new messages