You need to sign in to do that
Don't have an account?
SFDC Alex
Difference between "percent" and "percent-fixed"
Hi All,
Can someone please explain the difference between "percent" and "percent-fixed"? Also when to use which amon these two.
I am confused over here.
Thanks in Advance,
SFDC Alex
Can someone please explain the difference between "percent" and "percent-fixed"? Also when to use which amon these two.
I am confused over here.
Thanks in Advance,
SFDC Alex
If you use "percent" and provide your input as 1, it is displayed as "100%" (Multiplied by 100).
If you use "percent-fixed" and provide the input as 1, it is displayed as "1%" (Displays your input value as is)
All Answers
If you use "percent" and provide your input as 1, it is displayed as "100%" (Multiplied by 100).
If you use "percent-fixed" and provide the input as 1, it is displayed as "1%" (Displays your input value as is)
Thanks for the answer!!!
Just out of curiosity, can the input be given as decimal number such as 0.01 in case of "percent" if someone tries to match its functionality with "percent-fixed"?
Thanks in Advance,
SFDC Alex
I don't think so. You can use lightning:fomattedNumber with style "percent" for that.
<lightning:formattedNumber value="0.01" style="percent" /> ==> 1%
Note that, you can't use "percent-fixed" in this case as the result will be as below:
<lightning:formattedNumber value="0.01" style="percent-fixed" /> ==> 0%