When we are using currency option on a control pega is showing like below
CAD123
expected is
CAD 123
Do we have any easy way to do it? Adding extra space when we don’t have the current symbol available with us.
When we are using currency option on a control pega is showing like below
CAD123
expected is
CAD 123
Do we have any easy way to do it? Adding extra space when we don’t have the current symbol available with us.
One way to achieve the expected format of “CAD 123” is to use a custom format mask with a space between the currency symbol and the value.
To do this, you can follow these steps:
This should display the currency value in the format of “CAD 123” instead of “CAD123”.
Or Follow the Screenshot Option
Change the dropdown Currency symbol (e.g. $) to 3 character currency code (e.g. USD)
Or We can use the JS with the following link
Thanks
Sumit K.
import java.util.Currency;
import java.util.Locale;
public class CurrencyDemo {
public static void main(String args) {
Locale indiaLocale = new Locale(“en”, “IN”);
Currency indiaCurrency = Currency.getInstance(indiaLocale);
System.out.println("INR currency code: " + indiaCurrency.getCurrencyCode());
System.out.println("INR currency symbol: " + indiaCurrency.getSymbol());
}
}
we had INR present with us and used the getSymbol to fetch the symbol value and formed my desired string.