<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tomblog &#187; Fields</title>
	<atom:link href="http://tomblog.insomniacminds.com/tag/fields/feed/" rel="self" type="application/rss+xml" />
	<link>http://tomblog.insomniacminds.com</link>
	<description>Rantings of an Insomniac Mind</description>
	<lastBuildDate>Tue, 15 Jun 2010 19:51:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>SharePoint Tricks: Allow Duplicate Column Names</title>
		<link>http://tomblog.insomniacminds.com/2009/06/29/sharepoint-tricks-allow-duplicate-column-names/</link>
		<comments>http://tomblog.insomniacminds.com/2009/06/29/sharepoint-tricks-allow-duplicate-column-names/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 23:02:20 +0000</pubDate>
		<dc:creator>Tombo</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Columns]]></category>
		<category><![CDATA[Fields]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tricks]]></category>

		<guid isPermaLink="false">http://tomblog.insomniacminds.com/?p=103</guid>
		<description><![CDATA[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&#8217;ve all seen it. You&#8217;re creating some columns (list or site ones) and suddenly SharePoint gives you this error: I finally got pissed at this problem, so I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>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&#8217;ve all seen it. You&#8217;re creating some columns (list or site ones) and suddenly SharePoint gives you this error:</p>
<div id="attachment_105" class="wp-caption alignnone" style="width: 510px"><img class="size-full wp-image-105" title="SharePoint Tricks: Duplicate column name error" src="http://tomblog.insomniacminds.com/wp-content/uploads/2009/06/st_dcn_1.png" alt="SharePoint Tricks: jfjfjf" width="500" height="119" /><p class="wp-caption-text">SharePoint Tricks: Duplicate column name error</p></div>
<p>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 &#8220;Title&#8221; 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 &#8220;forbidden&#8221; 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.</p>
<p>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 &#8220;good&#8221; 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.</p>
<p><code>javascript:g_FieldName={};alert('ok');</code></p>
<p>This code will clear the &#8220;forbidden&#8221; column names array and give you a visual confirmation when you can go on.</p>
<p>I hope this little trick will help some of you guys. Use it with wisedom however. <img src='http://tomblog.insomniacminds.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  &#8217;till next time!</p>
]]></content:encoded>
			<wfw:commentRss>http://tomblog.insomniacminds.com/2009/06/29/sharepoint-tricks-allow-duplicate-column-names/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
