SharePoint Internals – Hristo Pavlov’s Blog

15 January, 2009

The column name that you entered is already in use or reserved. Choose another name.

Filed under: SharePoint — Tags: , , , , , , , , , , , , , — hristopavlov @ 3:34 am

This is an annoying one. SharePoint will not allow you to create a site column from the UI (using the _layouts/fldnew.aspx page) if the name of the column is one of:

constructor, concat, join, pop, push, reverse, shift, slice, sort, splice or unshift

even if these site columns do not exist in the SharePoint site. If you try to create one of these fields you will get an error message saying that:

The column name that you entered is already in use or reserved. Choose another name.

Hmmm … Well after investigating this one it turned out to be a genuine bug caused by a JavaScript artifact. The way the fldnew.aspx page checks at the client side if a column already exists is by having all existing columns stored in a JavaScript Array called g_FieldName and then checking if the column that user tries to create is already in the array. This is done by the following code:

g_FieldName[“E-Mail”.toLowerCase()] = 1;


g_FieldName[“Type”.toLowerCase()] = 1;

function doesFieldNameConflict( strName )



            return true;


            return true;


The problem with this code is that for some unknown to me reason which is probably related to the way the JavaScript VM is implemented, if you create a new Array called arr and then try to read arr[“shift”] for example, this will return the following string:


And this happens on both Internet Explorer and Firefox. And this will happen for all strings that are names of methods of the JavaScript Array object and this is case sensitive. Because SharePoint does the check in lower case, then only the methods that are entirely in lower case will be a problem and the list of SharePoint site columns you won’t be able to create from the UI given at the top is the list of all methods of the Array object that are fully lower case.

So how to get around this. Well first of all this is a bug that should be resolved by Microsoft. They could either store everything in upper case (no JavaScript methods are fully upper case) or can change the function to

function doesFieldNameConflict( strName )


      if(g_FieldName[strName.toLowerCase()] == 1)

            return true;


            return true;


The problem with the first function is that g_FieldName[strName.toLowerCase()] will be evaluated to true for anything which is not 0, false, null or unknown. In the case of arr[“shift”] it will return the string shown on the screen-shot above, which will be evaluated to “true”. So explicitly testing for “1” will resolve the bug.

In the meantime if you need to create a site column with one of those names you could do it using code or features. And if you wonder how I discovered this issue – well I wanted to create a site column called “Shift” as in work shift which I consider as a totally legitimate use case.



  1. […] The column name that you entered is already in use or reserved. Choose another name. […]

    Pingback by Links (1/15/2009) « Steve Pietrek - Everything SharePoint — 16 January, 2009 @ 1:38 am

  2. This is expected. There two equivalent ways to call a JavaScript function – the dot syntax you may be accustomed to and the bracket syntax (or “array” syntax). If arr is an array object, then arr.shift is the same as arr[“shift”] and it means “give me the shift method on the arr object”. You can even call the method: arr[“shift”]() to remove the first element (the same as arr.shift()).

    Comment by ondrejsv — 3 March, 2010 @ 6:36 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: