You need to sign in to do that
Don't have an account?

<apex:outputField>????
What is wrong with my statement:
Also All I want to do is drop the CurrencyISO from the field:
<apex:outputField value="{!SUBSTITUTE(TEXT(ROUND(item.Unit_Price__c, 0)), "GBP", "," )}" />
I can't teach you how to use controller extensions and Apex in a forum post. Take a look at the Visualforce Dev Guide section on Custom Controllers. Then spend some time reading the Apex Dev Guide.
If you really spend some time learning how Visualforce and Apex work together, it will make it easy for you to solve a lot of the questions you have been asking, but if you jump in without really understanding it, you'll confuse yourself more, rather than solving your problems, so don't rush; take your time to understand.
Most likely you'll find that you can use the methods on the Apex decimal type to do everything you need in a very simple controller. For example, setScale() allows you to return a number with two decimal places.
Apex is really, really powerful. I'm sure you'll find it worth the time investment to learn how to use it with Visualforce.
All Answers
I believe that outputfield is expecting a salesforce object field as its value.
try using outputtext instead.
This is the way to use the formula you posted:
<apex:outputText value="{0}">
<apex:param
value="{!SUBSTITUTE(TEXT(ROUND(item.amount, 0)), 'GBP', ',' )}"/>
</apex:outputText>
It doesn't do what you want, though, since it doesn't include the values after the decimal if it's 00 or 0#. Try something like this instead:
<apex:outputText value="{0}.{1}">
<apex:param value="{!SUBSTITUTE(TEXT(FLOOR(item.amount)), 'GBP', ',' )}"/>
<apex:param value="{!RIGHT(TEXT(ROUND((item.amount * 100), 2)),2)}"/>
</apex:outputText>
I don't think you really want to do this, though, since you lose the currency indicator for the field, and that can be important.
For example, if you have two opportunities, one is using GBP and the other is using USD,the first opportunity will display the value in GBP and the second in USD, but the user won't know that.
yes you are correct.. But the client wants the currency to be up on top of the pageblock... but also, wants the number to be formatted as 0,00.00
I could not get it to work that way... it kept coming up as 000.0
Thanks
Shan
Would you happen to know from your method up on top ... to place the comma in there...
like instead of 1965.95 have it say 1,965.95
Thanks
would you have an example of that? please
thanks
shan
I can't teach you how to use controller extensions and Apex in a forum post. Take a look at the Visualforce Dev Guide section on Custom Controllers. Then spend some time reading the Apex Dev Guide.
If you really spend some time learning how Visualforce and Apex work together, it will make it easy for you to solve a lot of the questions you have been asking, but if you jump in without really understanding it, you'll confuse yourself more, rather than solving your problems, so don't rush; take your time to understand.
Most likely you'll find that you can use the methods on the Apex decimal type to do everything you need in a very simple controller. For example, setScale() allows you to return a number with two decimal places.
Apex is really, really powerful. I'm sure you'll find it worth the time investment to learn how to use it with Visualforce.
I have written a custom controller, to do some caclulation and the result is coming as double.
In my apex page I am using the following line to display value
<apex:column headerValue="Distance" value="{!aAcct.Distance}"/>
I do not know how to format this. Apex pages shows big number. "25.77704809822828"
How can I use LEN function to show 25.77 only?
Thanks