I have an outputText where I display value from a controller.
This is what I am currently using:
<apex:outputText value="{0,number,###.0}">
<apex:param value="{!IF(ISNUMBER(test__c),test__c,'')}" />
</apex:outputText>
If at all there a value in test__c
, that value is displayed.
For Example: if value is 12.432 then its is shown as 12.4
This works well for me.
But now how can I add a suffix % to the outputText? i.e. I need the value as 12.4%
Best Answer
The % character is supported as part of the outputText format.
You can use syntax like this to achieve the formatting you want