Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.