Format field containing integer in edit/view form
-
09-12-2019 - |
Question
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"/>
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange