<?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>Welcome to ShanthaKumar&#039;s Blog &#187; InternalName</title>
	<atom:link href="http://ktskumar.com/blog/tag/internalname/feed/" rel="self" type="application/rss+xml" />
	<link>http://ktskumar.com/blog</link>
	<description>SharePoint, Silverlight and more.........</description>
	<lastBuildDate>Thu, 10 Jun 2010 01:42:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enable Internal Name in Create Column page</title>
		<link>http://ktskumar.com/blog/2010/02/07/enable-internal-name-in-create-column-page/</link>
		<comments>http://ktskumar.com/blog/2010/02/07/enable-internal-name-in-create-column-page/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 03:38:58 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Tips]]></category>
		<category><![CDATA[fldnew.aspx]]></category>
		<category><![CDATA[InternalName]]></category>

		<guid isPermaLink="false">http://ktskumar.com/blog/2010/02/07/enable-internal-name-in-create-column-page/</guid>
		<description><![CDATA[In SharePoint out-of-Box, we can&#8217;t able to add the internal name for the SharePoint field i.e., Columns. But we can enable that by modifying the Create column page on 12 Hive.
For that we have to modify the FldNew.aspx page, that is available under 12 Hive\TEMPLATE\LAYOUTS folder.
Before modifying, take a copy of that file.
Step 1: Open [...]]]></description>
			<content:encoded><![CDATA[<p>In SharePoint out-of-Box, we can&#8217;t able to add the internal name for the SharePoint field i.e., Columns. But we can enable that by modifying the Create column page on 12 Hive.</p>
<p>For that we have to modify the FldNew.aspx page, that is available under 12 Hive\TEMPLATE\LAYOUTS folder.</p>
<p>Before modifying, take a copy of that file.</p>
<p>Step 1: Open the file and search for this line,</p>
</p>
<blockquote><p align="left">&lt;INPUT type=&quot;hidden&quot; value=&lt;%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strName),Response.Output);%&gt; name=&quot;Name&quot;&gt;</p>
</blockquote>
<p>Step 2: Replace the above line with the following codes,</p>
</p>
<blockquote><p align="left">&lt;!&#8211; Internal Name &#8211;&gt;      <br />&lt;TR&gt;&#160; <br />&lt;TD class=ms-sectionline height=1 colspan=4&gt;&lt;IMG SRC=&quot;/_layouts/images/blank.gif&quot; width=1 height=1 alt=&quot;&quot;&gt;&lt;/TD&gt;&lt;/TR&gt;       <br />&lt;TR&gt;       <br />&lt;TD nowrap&gt;&lt;/TD&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TD class=&quot;ms-descriptiontext&quot; valign=&quot;top&quot;&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TABLE border=0 cellpadding=1 cellspacing=0&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TR&gt;&lt;TD height=28 valign=top class=ms-sectionheader id=onetidNewColumnOption&gt;&lt;H3 class=&quot;ms-standardheader&quot;&gt;&lt;SharePoint:EncodedLiteral runat=&quot;server&quot; text=&quot;Internal Name&quot; /&gt;&lt;/H3&gt;&lt;/TD&gt;&lt;/TR&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TR&gt;&lt;TD class=&quot;ms-propertysheet&quot; id=onetidNewColumnOption2&gt;&lt;SharePoint:EncodedLiteral runat=&quot;server&quot; text=&quot;Type an internal / static name for this column.&quot; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt; &lt;BR/&gt; &lt;BR/&gt;&lt;/TD&gt;&lt;/TR&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TABLE&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TD&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TD class=&quot;ms-authoringcontrols&quot; width=10&gt;&amp;nbsp;&lt;/TD&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TD class=&quot;ms-authoringcontrols&quot; ID=onetidFldEditGuts2&gt;&lt;LABEL for=&quot;idInternalColName&quot;&gt;&lt;SharePoint:EncodedLiteral runat=&quot;server&quot; text=&quot;Internal Name&quot; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;&lt;/LABEL&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;BR&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TABLE border=0 cellspacing=1&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TR&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TD colspan=2&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;INPUT class=&quot;ms-input&quot; title=&quot;&lt;SharePoint:EncodedLiteral runat=&#8217;server&#8217; text=&#8217;&lt;%$Resources:wss,fldedit_columnname%&gt;&#8217; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;&quot; type=&quot;text&quot; value=&lt;%SPHttpUtility.AddQuote(SPHttpUtility.HtmlEncode(strName),Response.Output);%&gt; name=&quot;Name&quot; MaxLength=255 size=&quot;&lt;SharePoint:EncodedLiteral runat=&#8217;server&#8217; text=&#8217;&lt;%$Resources:wss,fldedit_idDisplayNameSize%&gt;&#8217; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;&quot; /&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TD&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TR&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TABLE&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TD&gt;       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/TR&gt;</p>
</blockquote>
<p>Step 3: Now the page is enable with the internal name. Now we can enter the different name for Internal name and display name on creating a new column.</p>
<p><a href="http://ktskumar.com/blog/wp-content/uploads/2010/02/image.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="Create new column with the internal name" src="http://ktskumar.com/blog/wp-content/uploads/2010/02/image_thumb.png" width="660" height="206" /></a> </p>
<p> <img src='http://ktskumar.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  cheers.</p>
]]></content:encoded>
			<wfw:commentRss>http://ktskumar.com/blog/2010/02/07/enable-internal-name-in-create-column-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to get InternalName in ListEdit Page</title>
		<link>http://ktskumar.com/blog/2009/09/25/how-to-get-internalname-in-listedit-page/</link>
		<comments>http://ktskumar.com/blog/2009/09/25/how-to-get-internalname-in-listedit-page/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 01:09:08 +0000</pubDate>
		<dc:creator>Shantha Kumar</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Coulmns]]></category>
		<category><![CDATA[Customize]]></category>
		<category><![CDATA[Field]]></category>
		<category><![CDATA[InternalName]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[listedit]]></category>
		<category><![CDATA[spField]]></category>

		<guid isPermaLink="false">http://ktskumar.com/blog/?p=242</guid>
		<description><![CDATA[In SharePoint the column or field has two names. One is DisplayName, used to view the field name publically in all pages and another is InternalName used internally to refer the Field. This Internal name will be used in CAML Queries, during retreiving inserting and updating the list item.We can&#8217;t see this Internal name in any pages [...]]]></description>
			<content:encoded><![CDATA[<p>In SharePoint the column or field has two names. One is DisplayName, used to view the field name publically in all pages and another is InternalName used internally to refer the Field. This Internal name will be used in CAML Queries, during retreiving inserting and updating the list item.We can&#8217;t see this Internal name in any pages normally, but we can do some work around for getting this internalnames, such as writing the code  &amp; look in to the url of the particular field.</p>
<p>Now i giving a simple tip on displaying the InternalName on ListEdit page itself, this will help us in knowing internal name quickly and consume the time when we work up on List and ListItems.</p>
<div style="margin:left:0px">
<ul>
<li>For that, we have to edit the ListEdit.aspx page, which is available under &lt;System Folder&gt;:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\</li>
<li>Before going to edit that page, backup that file and open it. This is the screenshot, taken before editing the page,<br />
<a href="http://ktskumar.com/blog/wp-content/uploads/2009/09/lstedit1.JPG" target=_blank"><img src="http://ktskumar.com/blog/wp-content/uploads/2009/09/lstedit1.JPG" alt="Displaying ListEdit Page without Internal Names" /></a></li>
<li>In the ListEdit page, add the Column as InternalName under Columns section,To add the header for Internalname under Columns section, Search for the following line<br />
<em>for (Int32 iIndex = 0; iIndex &lt; spFields.Count; iIndex ++ )</em></li>
<li>At first we have to add the header column, for that before the above searched  line there is &lt;TR&gt; tag with three header &lt;TH&gt; tags, add the following &lt;TH&gt; within the &lt;TR&gt; tag,<strong>&lt;TH scope=&#8221;col&#8221;-vh2-nofilter width=25% id=&#8221;TH1&#8243;&gt;Internal Name&lt;/TH&gt;</strong>After adding the line, the code look like this,
<div class="codecss" style="font-size:11px;">&lt;TR&gt;<br />
&lt;TH scope=&#8221;col&#8221;-vh2-nofilter width=25% id=&#8221;1600&#8243;&gt;<br />
&lt;SharePoint:EncodedLiteral runat=&#8221;server&#8221; text=&#8221;&lt;%$Resources:wss,listedit_columnclicktoedit%&gt;&#8221; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;<br />
&lt;/TH&gt;<br />
&lt;TH scope=&#8221;col&#8221;-vh2-nofilter width=25% id=&#8221;1700&#8243;&gt;<br />
&lt;SharePoint:EncodedLiteral runat=&#8221;server&#8221; text=&#8221;&lt;%$Resources:wss,listedit_type%&gt;&#8221; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;<br />
&lt;/TH&gt;<br />
&lt;TH scope=&#8221;col&#8221;-vh2-nofilter colspan=2 id=&#8221;1800&#8243;&gt;<br />
&lt;% if (!spList.ContentTypesEnabled) { %&gt;<br />
&lt;SharePoint:EncodedLiteral runat=&#8221;server&#8221; text=&#8221;&lt;%$Resources:wss,listedit_required%&gt;&#8221; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;<br />
&lt;% } else { %&gt;<br />
&lt;SharePoint:EncodedLiteral runat=&#8221;server&#8221; text=&#8221;&lt;%$Resources:wss,listedit_used_in%&gt;&#8221; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;<br />
&lt;% } %&gt;<br />
&lt;/TH&gt;<br />
<strong>&lt;TH scope=&#8221;col&#8221;-vh2-nofilter width=25% id=&#8221;TH1&#8243;&gt;Internal Name&lt;/TH&gt;<br />
</strong>&lt;/TR&gt;<br />
for (Int32 iIndex = 0; iIndex &lt; spFields.Count; iIndex ++ )
</div>
</li>
<li>And then we have to add the InternalName for each field type, for that<br />
Search for the following if condition line,</p>
<p><em>if (spField.ReadOnlyField &amp;&amp; !bCountRelated)</em></p>
<p>The above line checks the current field is read only or not, by default the read only fields are User and Calculated Columns</li>
<li>If you look in to the page, you can able to see the switch case statement under the if condition. Switch case statement checks the each read-only field type and adding the row contents such as (Display name, field type and Require or not) columns based on the field type,so we have to add the following line (column) within each case statement,
<p><strong>&lt;TD-vb2&gt;&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&lt;/TD&gt;</strong></p>
<p>In this page, spField.InternalName displays the Internal Name for the current field type.</p>
<p>The above TD tag content ensures that, the each field row has its own Internalname</li>
<li>The else condition refers to the non-read only fields, If we add this line <strong>&lt;TD-vb2&gt;&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&lt;/TD&gt;</strong>, the internal Name will be appeared on all the non-read only field types.</li>
<p>After adding all the lines, the code for the if and else condition will be look like this,</p>
<div class="codecss" style="font-size:11px;">if (spField.ReadOnlyField &amp;&amp; !bCountRelated)<br />
{<br />
switch (spField.Type)<br />
{<br />
case SPFieldType.Calculated:<br />
rowClass = (rowClass == &#8220;&#8221;)? &#8220;ms-alternating&#8221; : &#8220;&#8221;;<br />
%&gt;<br />
&lt;TR&gt;<br />
&lt;TD-vb2&gt;<br />
&lt;A ID=&#8221;LinkEditField&lt;%= Convert.ToString(iIndex) %&gt;&#8221; HREF=&#8221;FldEdit.aspx?List=&lt;%SPHttpUtility.UrlKeyValueEncode(spList.ID.ToString(&#8221;B&#8221;).ToUpper(), Response.Output);%&gt;&amp;Field=&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&#8221;&gt; &lt;%SPHttpUtility.HtmlEncode(spField.Title,Response.Output);%&gt;<br />
&lt;/A&gt;<br />
&lt;/TD&gt;<br />
&lt;TD-vb2&gt;<br />
&lt;SharePoint:EncodedLiteral runat=&#8221;server&#8221; text=&#8221;&lt;%$Resources:wss,listedit_calculated%&gt;&#8221; EncodeMethod=&#8217;HtmlEncode&#8217;/&gt;<br />
&lt;/TD&gt;<br />
&lt;TD colspan=2-vb2&gt;<br />
&lt;%SPHttpUtility.HtmlEncode(GetUsedIn(spField), Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
<strong>&lt;TD-vb2&gt;<br />
&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;<br />
&lt;/TD&gt;</strong><br />
&lt;/TR&gt;<br />
&lt;%<br />
break;<br />
case SPFieldType.User:<br />
rowClass = (rowClass == &#8220;&#8221;)? &#8220;ms-alternating&#8221; : &#8220;&#8221;;<br />
%&gt;<br />
&lt;TR&gt;<br />
&lt;TD-vb2&gt;<br />
&lt;A ID=&#8221;LinkEditField&lt;%= Convert.ToString(iIndex) %&gt;&#8221; HREF=&#8221;FldEditEx.aspx?List=&lt;%SPHttpUtility.UrlKeyValueEncode(spList.ID.ToString(&#8221;B&#8221;).ToUpper(), Response.Output);%&gt;&amp;Field=&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&#8221; &gt; &lt;%SPHttpUtility.HtmlEncode(spField.Title,Response.Output);%&gt;&lt;/A&gt;<br />
&lt;/TD&gt;<br />
&lt;TD-vb2&gt;&lt;%SPHttpUtility.HtmlEncode(spField.TypeDisplayName, Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
&lt;TD colspan=2-vb2&gt;&lt;%SPHttpUtility.HtmlEncode(GetUsedIn(spField), Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
<strong>&lt;TD-vb2&gt;<br />
&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
</strong>&lt;/TR&gt;<br />
&lt;%<br />
break;<br />
default:<br />
if (spField.XPath != null &amp;&amp; !spField.Hidden)<br />
{<br />
%&gt;<br />
&lt;TR&gt;<br />
&lt;TD-vb2&gt;<br />
&lt;%SPHttpUtility.HtmlEncode(spField.Title,Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
&lt;TD-vb2&gt;&lt;%SPHttpUtility.HtmlEncode(spField.TypeDisplayName, Response.Output);%&gt;&lt;/TD&gt;<br />
&lt;TD colspan=2-vb2&gt;<br />
&lt;% if ( !spList.ContentTypesEnabled &amp;&amp; spField.Required == true ) { %&gt; &lt;IMG SRC=&#8221;/_layouts/images/check.gif&#8221; alt=&#8221;Checked&#8221;&gt; &lt;% ; } %&gt;<br />
&lt;%SPHttpUtility.HtmlEncode(GetUsedIn(spField), Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
<strong>&lt;TD-vb2&gt;<br />
&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
</strong>&lt;/TR&gt;<br />
&lt;%<br />
}<br />
break;<br />
}<br />
}<br />
else<br />
{<br />
rowClass = (rowClass == &#8220;&#8221;)? &#8220;ms-alternating&#8221; : &#8220;&#8221;;<br />
%&gt;<br />
&lt;TR&gt;&lt;TD-vb2&gt;<br />
&lt;%if (Enum.IsDefined(typeof(SPFieldType), spField.TypeAsString) &amp;&amp; spField.Type != SPFieldType.Lookup &amp;&amp; spField.Type != SPFieldType.User) {%&gt;<br />
&lt;A ID=&#8221;LinkEditField&lt;%= Convert.ToString(iIndex) %&gt;&#8221; HREF=&#8221;FldEdit.aspx?List=&lt;%SPHttpUtility.UrlKeyValueEncode(spList.ID.ToString(&#8221;B&#8221;).ToUpper(), Response.Output);%&gt;&amp;Field=&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&#8221;&gt; &lt;%SPHttpUtility.HtmlEncode(spField.Title,Response.Output);%&gt;&lt;/A&gt;<br />
&lt;%} else {%&gt;<br />
&lt;A ID=&#8221;LinkEditField&lt;%= Convert.ToString(iIndex) %&gt;&#8221; HREF=&#8221;FldEditEx.aspx?List=&lt;%SPHttpUtility.UrlKeyValueEncode(spList.ID.ToString(&#8221;B&#8221;).ToUpper(), Response.Output);%&gt;&amp;Field=&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;&#8221;&gt; &lt;%SPHttpUtility.HtmlEncode(spField.Title,Response.Output);%&gt;&lt;/A&gt;<br />
&lt;%}%&gt;<br />
&lt;/TD&gt;<br />
&lt;TD-vb2&gt;&lt;%SPHttpUtility.HtmlEncode(spField.TypeDisplayName, Response.Output);%&gt;&lt;/TD&gt;<br />
&lt;TD<br />
colspan=2<br />
class=ms-vb2&gt;<br />
&lt;% if ( !spList.ContentTypesEnabled &amp;&amp; spField.Required == true ) { %&gt; &lt;IMG SRC=&#8221;/_layouts/images/check.gif&#8221; alt=&#8221;Checked&#8221;&gt; &lt;% ; } %&gt;<br />
&lt;%SPHttpUtility.HtmlEncode(GetUsedIn(spField), Response.Output);%&gt;<br />
&lt;/TD&gt;<br />
<strong>&lt;TD-vb2&gt;<br />
&lt;%SPHttpUtility.UrlKeyValueEncode(spField.InternalName, Response.Output);%&gt;<br />
&lt;/TD&gt;</strong><br />
&lt;/TR&gt;<br />
&lt;%<br />
}</div>
<p>The final outcome will be as follows,<br />
<a href="http://ktskumar.com/blog/wp-content/uploads/2009/09/lstedit2.JPG" target="_blank"><img src="http://ktskumar.com/blog/wp-content/uploads/2009/09/lstedit2.JPG" alt="Displaying ListEdit Page with Internal Names" /></a></ul>
</div>
<p>To download the listedit.aspx page, click <a href="http://ktskumar.com/blog/wp-content/uploads/2009/09/listedit.txt" target="_blank">here</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://ktskumar.com/blog/2009/09/25/how-to-get-internalname-in-listedit-page/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
