SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list with a field that contains an integer, let´s say 12345. In the edit/view form, the field is displayed as 12,345. How can I format the field so that it displays 12345? This is how the field looks in sharepoint designer.

<SharePoint:FieldLabel Grid.Column="0" Grid.Row="0" ControlMode="Display" FieldName="EmployeeNumber" />
<Comment FieldName="EmployeeNumber" FieldInternalName="EmployeeNumber" FieldType="Integer"    />
<SharePoint:FormField Grid.Column="1" Grid.Row="0" ControlMode="Display"  FieldName="EmployeeNumber" IncludeDescription="True"/>
share|improve this question
up vote 2 down vote accepted

Out of the box, I am afraid there is no option to remove the comma. I have seen similar issues with dates, where a year would be rendered as 2,012 instead of 2012 for example.

Unless you have specific requirements, the easiest workaround is to use a text column instead of a number column.

share|improve this answer
If I change FormField to TextField, I get an error: Unable to cast object of type 'Microsoft.SharePoint.SPFieldNumber' to type 'Microsoft.SharePoint.SPFieldText'. – AGuyCalledGerald Nov 2 '12 at 17:13
What I meant was to change the column type from number to text, in the list settings (not in SharePoint Designer). I have edited my answer. – Christophe Nov 2 '12 at 17:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.