+ Start a Discussion
Anil DuttAnil Dutt 

Remove Decimal from number

Hi,

 

I have a iFrrame in my VF page

 

<apex:iframe id="theIframe" src="http://test.com?opportunityId={!Test_Flight_Request__c.Opportunity__c}&flightRequestID={!Test_Flight_Request__c.id}&passengers={!Test_Flight_Request__c.Pax_del__c}" width="1500px" height="600px" scrolling="true" />

 

Test_Flight_Request__c.Pax_del__c has data type Number and so it has value Like 2.0

 

Because of decimal number this value does not pass in query string

 

How can i remove Decimal number from 2.0 in VF page?

 

Thanks for any help

Best Answer chosen by Admin (Salesforce Developers) 
Anil DuttAnil Dutt

This solves the problem

 

{!Text(Test_Flight_Request__c.Pax_del__c)}

 

Thanks All

All Answers

Starz26Starz26

You will have to modify the value in the controller to make it not have a decimal. You could convert it to text and manipulate the string or maybe set the precision to 0 or use integet.valueOf()

 

To simply display on the page without the decimal you would:

 

<apex:column HeaderValue="Utilization" >
            <apex:outputText value="{0,number,#.##}">
                <apex:param value="{!a.Utilization__c}"/>
            </apex:outputText>
        </apex:column>

 

but I do not believe that is your sceniero.

Anu Raj.ax1269Anu Raj.ax1269

Hi Anil

  Please try this code.

  eE_remaining = 123.45

  integer k = eE_remaining.intvalue();

 Value of K = 123;

Thanks

Anu

Anil DuttAnil Dutt

Can't i do anything in Visual Force Page?

Anil DuttAnil Dutt

This solves the problem

 

{!Text(Test_Flight_Request__c.Pax_del__c)}

 

Thanks All

This was selected as the best answer