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.

26 Comments

  1. 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

  4. Erick Rims said,

    September 4, 2008 at 10:17 AM

    Really your blog is very cool with good tips of characters and related Internal hex code. The tips are very much useful. Nice work done by you………

    really appreciated

    thanks

  5. Χρήστος said,

    January 8, 2009 at 8:16 AM

    I would like to recomend imtech field explorer
    (http://blog.mastykarz.nl/imtech-fields-explorer-visual-studio-2008-plugin/) for finding filed names, easily

  6. SaturnVibes said,

    April 18, 2009 at 1:57 PM

    Thanks for your list of special characters.
    I’ve written a program to convert those special characters to the appropriate code here: http://www.saturnvibes.com/SharepointProjectServer2007/post/2009/04/18/Lists-column-internal-name.aspx

  7. SaturnVibes said,

    April 28, 2009 at 5:01 PM

    Hey, there’s an easier way to get the internal name of a List field. Namely by: list.Field[“fieldname”].InternalName

    See here for example: http://www.saturnvibes.com/SharepointProjectServer2007/post/2009/04/28/Lists-column-internal-name-Update.aspx

  8. SSR said,

    July 14, 2009 at 1:50 PM

    Hi,

    This posting is helpful. Apart from this I am searching for the representation of non-english charaters in internal names. For eg. if a column is created and named in chinese language then what will be the internal name of the column??

  9. baby said,

    September 25, 2009 at 5:45 PM

    Great resource

  10. Em said,

    February 4, 2010 at 2:05 PM

    Very useful. Thanks 🙂

  11. Showkath said,

    April 27, 2010 at 9:47 AM

    nice article,Thanks

  12. Wawawum said,

    June 16, 2010 at 8:01 PM

    Thank you for this very useful post. I use this conversion table when adding documents with the SPFileCollection.Add method. For setting metadata you have to pass a Hashtable containing field names with their values. The problem is that field names must be internal names without these escape characters. That’s why I needed this list.

    Ty

  13. Antoine said,

    June 26, 2010 at 1:42 PM

    Bonjour,

    Je suis Antoine Rezvani et je propose des sites internet areswebstudio pas cher grace a la sous traitance offshore.
    N’hesitez pas a me contacter : ares web studio

    A bientot

    Antoine

  14. February 23, 2011 at 11:19 AM

    […] использовать Internal Names. Потому что Sharepoint кодирует их соответствующим образом.  И получается _x0424__x0418__x041e__x0020__x04. Если уж так […]

  15. Devon Szwarc said,

    November 23, 2011 at 8:34 PM

    Spot on with this write-up, I truly suppose this website wants far more consideration. I?ll in all probability be once more to learn far more, thanks for that info.

  16. Gennady Vanin said,

    June 11, 2012 at 5:00 PM

    The most annoying is that if you created the field name in, for e., cyrillics and then rename it using latin letters, it is already late. It is necessary to know and do it straight from the very start

  17. Chetan said,

    June 20, 2012 at 9:24 PM

    I have a column named “11/22” and SharePoint is giving it an internal field name as “_x0031_1_x002f_22”. I get the portion about the “/” being “_x002f_” and the 22 after the slash, but can’t quite get the 11, how’s 11 embedded in the internal field name? I see the 22, after the “/”, but 11 seem to be way off. Thoughts?

  18. Chuck D said,

    September 25, 2012 at 12:00 AM

    SharePoint converts the first character of Field Names that are short and contain a number to their hex Ascii value 0x31 = 1. I have yet to figure out why they do this, but that is what happens.

  19. October 16, 2012 at 7:27 PM

    […] Please note that if you used certain special characters while creating the column, SharePoint will not use them for the internal name, but replace them with hex codes (https://abstractspaces.wordpress.com/2008/05/07/sharepoint-column-names-internal-name-mappings-for-no…): […]

  20. granbalafria said,

    March 6, 2013 at 1:55 AM

    Excelent Work Mr Sanghvi, very usefull!

  21. Joep said,

    June 19, 2014 at 3:57 PM

    Thanks for This. For automated situations one can do a C# Regex.Replace.
    I use this as a MatchEvaluator delegate body: return “_x” + ((int)match.Value[0]).ToString(“X4”) + “_”;

    With this greedy regex:”[^a-zA-Z0-9]”

    That replaces the special characters without needing a lookup table or anything else.

  22. Perry said,

    October 29, 2015 at 11:45 PM

    It is important to note that there are THREE names for every field, not two. There is the DisplayName (what the user types), the StaticName (what it converts to with the mappings specified in this article), and the InternalName (which is modified from the StaticName as necessary to make it unique to the current list).

    The SharePoint APIs use various of these three forms in various places, and often are poorly documented.

  23. November 30, 2018 at 10:50 PM

    Very Helpful. Thanks for compiling these.

  24. Topegui said,

    January 7, 2020 at 6:00 AM

    Thanks

  25. Morido said,

    May 5, 2021 at 9:02 AM

    I’m naming a column R12 and Sharepoint is changing that R to x0050. Why is that happening?


Leave a reply to SI PHAM Cancel reply