Creating a Clean “Internal Name” for SharePoint Columns

Author by Pete Hurth

Have you ever created a site column but when you try to reference it you get this: Have%20you _X007C_ever _X0025_created _X0024_a%20site_X0025_column _X003C_but_X007C_when%20you%20try_X0022_to_X00A3_ reference%20it_X003C_you_X0023_get%20this The garbled mess above is a perfect example of what to avoid when creating a site column within SharePoint. During the creation process, SharePoint determines an “internal name”. This name cannot be changed and is used for reference and security purposes. As an example, if you create a column named “My Data”, the internal name will be “My_X0020_Data” even if you edit the column later and change it to another value such as “The Best Data Ever”. SharePoint treats the initial value created as the internal name within the database and further changes only affect the display name. This raises two important questions… 1) How do you determine the “internal name” for SharePoint site columns that have already been created and 2) How can you create new columns without the hex code. Determining the Internal Name for a Column One of the easiest methods for determining a site column’s internal name is to edit the column and view the URL [Site Settings > Site columns > “click on the desired column”]. Within this page, examine the part of the URL after “fledit.aspx?field=” and before “&Source…” to reveal the internal name as seen in the image below.

Dirty SharePoint Site URL

In this case, the internal name for the column is “Client%5Fx0020%5FName”, despite the display name of “Client Name”. If you need to reference this column by its “real” name and enter “Client Name” the reference will fail. Create Columns without Hex Code Creating a site column without hex code and an easy to use display name is a two part process. When you first create a column, don’t put any spaces in the Column name field. Example: Name a new site column “MyData” instead of “My Data” during creation. Immediately after creating the column, go back in and change it to the desired display name, such as “My Data”. Now you have an easy to use internal name of “MyData” for reference purposes, and a user friendly display name of “My Data” as seen in the image below.

Clean SharePoint Column URL

This article was originally written by Kelly Rusk. It is moderated currently by Peter Hurth.

Pete Hurth

Social Collaboration Solution Lead