function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sp13sp13 

currency format in visualforce page

my custom currency field shows the right format in the detailed page like this: $1,000.00
but when i called the field in visualforce page it displayed like this: 1000.00
it's fine for me not to display the '$' sign but i need the comma, how?
help
Sure@DreamSure@Dream
Hi sp13,


Did u use <apex:outputField> in visualforce page or used <apex:outputText>?

Thanks,
sp13sp13
oh! i'm using <apex:outputText> :)
thank you! i changed it to <apex:outputField now and it worked! :D
but do you know how can i remove the '$' sign?
i don't need the '$' to show for the other curreny fields.
thanks! :)
Sure@DreamSure@Dream
Check if this works...

<apex:outputField value="{!MID(field,1,LEN(field)-1)}"/>

Thanks
sp13sp13
hi Sure@Dream, it didn't work :(
Ravi Rao ArrabelliRavi Rao Arrabelli
The Best Solution for the above problem is:

<apex:outputText label="NRR" value="{0,number}">
{! Opportunity.CurrencyIsoCode} &nbsp;
<apex:param value="{! Opportunity.NRR__c}" />
</apex:outputText>

This is give you the Currency (CurrencyIsoCode) as well as the value (in proper format) if it exists in the field value.