I have three fields in the subject line, the last 3, that are displaying the numbers with a decimal. The fields are rollup summaries. How can I get it so it doesn't show the decimal?

<messaging:emailTemplate recipientType="User"
     subject=" {!relatedTo.Account.Name} - Due: {!relatedTo.Date_Due__c}, {!relatedTo.Total_Eligible__c} Eligible, {!relatedTo.Dent_Insured_Lives_Quoted__c} Dental Lives, {!relatedTo.Vis_Insured_Lives_Quoted__c} Vision Lives" >
    <messaging:htmlEmailBody >  
                <STYLE type="text/css">
                    TH {font-size: 14px; font-face: arial;background: #CCCCCC; border-width: 1;  text-align: center } 
                    TD  {font-size: 14px; font-face: verdana } 
                    TABLE {border: solid #CCCCCC; border-width: 2}
                    TR {border: solid #CCCCCC; border-width: 2}
                <font face="arial" size="3">
                    <table border="0" >
                        <tr > 
                            <th>   Quote Number   </th><th>   Contribution Type   </th><th>   Current Carrier   </th><th>   In Network   </th><th>   Out of Network   </th>
                        <apex:repeat var="cx" value="{!Relatedto.R00N30000001MeIXEA0__r}">
                                <td>{!cx.Quote_Number_Holder__c} </td>
                                <td>{!cx.In_NetworkDiag_Prev__c}/ {!NullValue(cx.In_Network_Basic__c,"0")}/ {!NullValue(cx.In_Network_Major__c,"0")}/ {!NullValue(cx.In_Network_Ortho__c,"0")}; {!cx.In_Network_Deductible_Ind__c}/ {!cx.In_Network_Deductible_Fam__c} Ded; {!NullValue(cx.In_Network_Annual_Max__c,0)} Max; {!cx.In_Network_Ortho_Max__c}</td>
                                <td>{!cx.Out_Network_Diag_Prev__c}/ {!NullValue(cx.Out_Network_Basic__c,"0")}/ {!NullValue(cx.Out_Network_Major__c,"0")}/ {!NullValue(cx.Out_Network_Ortho__c,"0")}; {!cx.Out_Network_Deductible_Ind__c}/ {!cx.Out_Network_Deductible_Fam__c} Ded; {!cx.Out_Network_Annual_Max__c} Max; {!NullValue(cx.Out_Network_Ortho_Max__c,0)} </td>
                    <p />
  • Use outputText with apex:param
    – Raul
    Commented Mar 23, 2017 at 18:25
  • @RahulSharma how do I do that?
    – Michelle
    Commented Mar 23, 2017 at 18:26

2 Answers 2


You can use FLOOR to omit decimals

<apex:outputText value="{!FLOOR(sObj.decimal_field__c)}"/>

If the decimal_field__c value is 12.00 or 12.01 or 12.99,

It will show 12


By Using <apex:outputText> you will able solve your problem.... Let say you want show In_Network_Major__c field without decimal value then to need use outputtext with below format:

<apex:outputText value="{!floor(In_Network_Major__c)}"/>
  • If I wanted to do it for {!relatedTo.Total_Eligible__c} would it be <apex:outputText value="{!floor(relatedTo.Total_Eligible__c)}"/>
    – Michelle
    Commented Mar 23, 2017 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .