SharePoint Column Names: Internal name mappings for non alphabet.

Whenever creating any column for list, SharePoint creates two names for it.

  1. External name to display in views, forms
  2. Internal name

Best example to understand internal name is “Created By” field which is having internal name “Author”.

You can change the display name as many times as you want, but can never change the internal name once column is created.

If you are creating field from code behind then you can assign internal name as per your choice, but when doing it thru web SharePoint gives you option to give display name, and creates internal name by itself. When internal name is defined, if you have any of the non alphabet, numeric character as part of name ,SharePoint converts them to special hex codes.

For e.g. trying to create field “Emp Name” gives internal name as “Emp_x0020_Name”

( I guess this may be seems to be part of some security settings, to avoid sql injection etc, since they are allowing characters like ‘(quote), =(equal to), “(double quote), ; (semi colon) etc. You can create column with name      ‘ or ‘1=1 which means lot in security)

After some trial and errors I was able to build the conversion table for future reference.

Character

Internal Hex Code

~

_x007e_

!

_x0021_

@

_x0040_

#

_x0023_

$

_x0024_

%

_x0025_

^

_x005e_

&

_x0026_

*

_x002a_

(

_x0028_

)

_x0029_

_

_

+

_x002b_

-

_x002d_

=

_x003d_

{

_x007b_

}

_x007d_

:

_x003a_

_x0022_

|

_x007c_

;

_x003b_

_x0027_

\

_x005c_

<

_x003c_

>

_x003e_

?

_x003f_

,

_x002c_

.

_x002e_

/

_x002f_

`

_x0060_

_x0020_

Do leave comment if you find this useful.

3 Comments

  1. SharePoint, SharePoint and stuff : SharePoint Kaffeetasse #64 said,

    May 9, 2008 at 6:10 am

    [...] SharePoint Column Names: Internal name mappings for non alphabet. [...]

  2. Prudhvi said,

    June 11, 2008 at 2:22 pm

    Kudos to you for coming up with this list. It was useful to me not in Sharepoint but while setting up the xslt styles for the excel spreadsheet.

    Thanks a lot.

  3. SI PHAM said,

    July 14, 2008 at 10:23 pm

    This article is extremely useful when you write code to serialize a list item into custom XML part of a Word 2007 .docx document. Each column of the SharePoint list must be encoded in the serialization; in addition, the customXML part need to use this encoded name. For more information, read chapter 7 of the book “Pro SharePoint Solution
    Development
    Combining .NET, SharePoint,
    and Office 2007″

    This book is published by APress, and its ISBN is :ISBN-13 (pbk): 978-1-59059-808-5
    ISBN-10 (pbk): 1-59059-808-3

Post a Comment