+ Start a Discussion
SanchSanch 

Converting a Number to String and maintain the comma

Hi All,

 

I have a field which is of type Rich Text Area. In this field I am generating an html table where I am displaying some values that are numbers. When I do that the comma in the values are lost and if it's 8000, it just displays 8000 rather than 8,000. What can I do to maintain the comma. Thanks.

 

Sanch

Best Answer chosen by Admin (Salesforce Developers) 
SanchSanch

I figured this out on my own. If you have a field called Area which is of type Number. All you need to do is Area.format(). Hope that helps someone in the future.

 

Sanch