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 numeric column in a list that displays like so:

16,090

I would like it to display without the comma:

16090

Can this be done?

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

I think the only way is to use a calculated column for the display, =TEXT(Number_Column,"0")

Edit: Unless you're using a DVWP and have control over the output, then you can format it how ever you need to in the XSLT markup.

share|improve this answer
add comment

Numeric formats are determined by your locale settings. So, for instance, if you are using locale 1033 (en-us), you'll see numbers displayed with the comma separator by default. You can change your locale settings, but that will change the formatting at the level where you make the change.

Otherwise, a calculated column or a DVWP are ways to go, as Eric mentions. Keep in mind that displaying numbers inconsistently may well add up to a poor UX.

share|improve this answer
add comment

Another option is to use an Integer field type, rather than a Number field type.

Unfortunately you cannot create an integer field through the browser, but it's pretty easy to do programmatically

Here's a short powershell script that will do the trick

$web=get-spweb http://urltosite
$list = $web.Lists["MyListName"]
$list.Fields.Add("MyIntFieldName", [Microsoft.SharePoint.SPFieldType]::Integer, $false)
share|improve this answer
1  
Thank Lucas. I tried your way. It is good in display form, but in edit form, it show commas again. Is there any way ? thanks –  user5366 Oct 24 '11 at 8:55
1  
Good point. You could put some client side inside the edit form to remove the commas when the page loads, but its a kinda messy solution. –  Paul Lucas Nov 9 '11 at 14:15
add comment

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.