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
EtienneCoutantEtienneCoutant 

Why 'COUNT' Roll-Up Summary fields are displayed as Decimals?

Hi,

 

I created a Roll-Up Summary field on Opportunity to count the number of Line Items with a revenue schedule:

Roll-Up Summary (COUNT Opportunity Product)

 

I assumed that it would return an Integer, but when I want to put that field in a Visualforce page, it shows it with decimals, e.g. 2.0

Is there a way to only display the Integer part?

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
EtienneCoutantEtienneCoutant

Hi, Thanks for your reply.

I figured I have to use the outputField component, and it works. My first attempt was to use outputText using params, but I don't think I can make it work that way...

 

Thanks again.

Etienne.

All Answers

mtbclimbermtbclimber
How are you exposing the data? Can you use the outputField component? It should always provide the same formatting as a standard detail page would for a given field definition.
EtienneCoutantEtienneCoutant

Hi, Thanks for your reply.

I figured I have to use the outputField component, and it works. My first attempt was to use outputText using params, but I don't think I can make it work that way...

 

Thanks again.

Etienne.

This was selected as the best answer