on 2025 Feb 14 2:44 PM
Hi,
here is explained how to use Formatters in a Control Attribute:
Is there a way to use this Formatters programmatically in a Rule ?
For Example the Number is 1000 and Currency is EUR if I use this Syntax $(C, 1000, EUR, it-IT ) in an Control Attribute it shows correctly and the result is 1.000,00 €
In JavaScript the way to do this is as follows:
let Text = Num.toLocaleString("it-IT", {style:"currency", currency:"EUR"});
The problem using this in a Rule is that the currency symbol is not shown and the result is 1.000,00
Thank you.
Request clarification before answering.
You need to call the MDK clientAPI formatting functions in your rule. For currency you would call clientAPI.formatCurrency.
context.formatCurrency(1000,'EUR','it-IT','{maximumFractionDigits:2,useGrouping:true}')
"1.000,00 €"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.