Archive for June 29th, 2009

Monday, June 29th, 2009

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: jfjfjf

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.


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!

Monday, June 29th, 2009

Another Summer Update

Yeah, you read it right. Another update. ;-) I just finished a new article about allow duplicate SharePoint column names. Hope you like it.

I’ve been quite busy with SharePoint this year, lots of frameworks built. Reusable stuff. ;-)¬† I’m also gathering all tricks and issues, so I hope making a couple of posts this summer. No promises though. ;-) In the meantime get ready for SharePoint Server 2010. A first beta should be released this summer. Less branding issues? I hope so. But we’re still with good old 2007, so for all your css goodness, I give you a nice link:

It gives you detailed compatibility tables between all browsers. Quite handy!

See you this summer!