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
Leonard Silon 16Leonard Silon 16 

how do I get all decimal places to display in a VF Email template?

I have this code:
                <tr > 
                        <th>Rate Factor</th>
                        <th>Term</th>
                        <th>Purchase Option</th>
                        
                    </tr>
                    <apex:repeat var="cx" value="{!relatedTo.Terms__r}">
                    <tr>
                        <td>{!cx.Current_Rate_Options__c}</td>
                        <td>{!cx.Term__c}</td>
                        <td>{!cx.FMV__c}</td>
                    </tr>
                    </apex:repeat>
                </table>

Current_Rate_Options__c is a number with 5 decimal places. If the number is 0.02700, the output shows as 0.027. This is in a VF email template. How do I get all 5 decimal places all the time?
Raj VakatiRaj Vakati
Use apex:outputText tag .like below 
 
<apex:outputText value="{0, number, ###,###,###,##0.00000}">{!cx.Current_Rate_Options__c}</apex:outputText>

complete code
 
<tr > 
                        <th>Rate Factor</th>
                        <th>Term</th>
                        <th>Purchase Option</th>
                        
                    </tr>
                    <apex:repeat var="cx" value="{!relatedTo.Terms__r}">
                    <tr>
                        <td><apex:outputText value="{0, number, ###,###,###,##0.00000}">{!cx.Current_Rate_Options__c}</apex:outputText></td>
                        <td>{!cx.Term__c}</td>
                        <td>{!cx.FMV__c}</td>
                    </tr>
                    </apex:repeat>
                </table>

​​​​​​​
Ajay K DubediAjay K Dubedi
Hi Leonard,

Below Code can fulfill your requirements, Hope this will work for you.
<apex:outputText value="{0, number, 00.00000}">
      <apex:param value="{!relatedTo.Current_Rate_Options__c}" />
</apex:outputText>

Please mark this as best answer if this solves your problem.

Thank you,
Ajay Dubedi