SharePoint Tricks: Allow Duplicate Column Names
One of the restrictions of SharePoint I always stumbled upon when clicking a SharePoint site together was the one of duplicate column names. I bet you’ve all seen it. You’re creating some columns (list or site ones) and suddenly SharePoint gives you this error:

SharePoint Tricks: Duplicate column name error
I finally got pissed at this problem, so I decided to investigate. Now, as I developed some columns through the feature framework, I knew it was possible to create columns with the same name, Display Name that is. Just look at Title. How many different “Title” columns can you see in the edit view screen? So I decided to take a look in the fldnew.aspx page, and what did I discover? A nice javascript array with all “forbidden” column names. I tried to make that array empty and tried again. Magic! The column name was approved. For some reason the team decided to block duplicate names off. But I feel this can be handy some times, especially when creating site columns. You are bound to hit this limitation some time.
But what does SharePoint do internally? It will always make a unique internal name (eg. if you enter Title, it will create a field with Title0 as internal name and Title as display name) A good practice however is to first create a field with a “good” internal name. Good meaning, no spaces, no weird characters, clear. And afterwards renaming it using this trick. Now, what is the trick you will ask? Well, quite simply: once the fldnew.aspx or fldedit.aspx page is loaded. Head toward the address bar of your browser and enter following javascript.
javascript:g_FieldName={};alert('ok');
This code will clear the “forbidden” column names array and give you a visual confirmation when you can go on.
I hope this little trick will help some of you guys. Use it with wisedom however.
’till next time!
July 1st, 2009 at 13:58
Great tip,.. Thanks much!
I always had to think of a different name that conveys the same meaning or add a pre/post-fix to make it different.
July 1st, 2009 at 14:06
Ping back from http://sashi4u.blogspot.com/
August 26th, 2010 at 15:17
Thanks man! You saved my day!!
September 23rd, 2010 at 18:38
a fantastic reflect save!
March 8th, 2011 at 9:58
[...] and it needed to be a site column, so off to google I went and found a post on Tomblog on how to allow duplicate site column display names. Since sharepoint already uses them, there [...]
March 24th, 2011 at 15:09
I dont get it! Please use an example including a sample URL. At what point do you add the code simple adding it replaces the whole URL to say javascript:g_FieldName={};alert(‘ok’); which does nothing when hitting Ok and hitting enter take you to that page!?
At what point do you add the java code? after fldedit.aspx? After work? Add= then java code?
_layouts/FldEdit.aspx?List=%7B832E2BCD%2DEEAE%2D4AFB%2DAF34%2D4646D411A5BD%7D&Field=Project%5Fx002f%5FWork
March 24th, 2011 at 18:02
I figured it out. Once the page(FDLEDIT.aspx or FDLNEW.aspx) has loaded you can simply type this into the address line(replacing everything in there): javascript:g_FieldName={};clear Then simply change the name to use another column name and press OK and done!
February 10th, 2012 at 4:25
AWESOME.
I wish I knew this 5 years ago!
March 19th, 2012 at 19:06
Hi There
Always wondered how this would be done and have tried numerous long winded solutions that dont work.
This works perfectly – just had to try on a new site.
Thanks again.
Iain