2

I am currently doing documentation for our SharePoint Applications. For the purpose of explanation/definition, What is the "x0020" portion of a SharePoint internal name for a column?

I'm not sure if its an ascii or hex or whatever...is there a technical term for this type of internal name?

5

It's a variant of url encoding, specific to SharePoint, and it's been maddening SharePoint developers for years. It's generated by SharePoint when columns are created in the UI with spaces in their names. SharePoint field internal names cannot have spaces.

There's a workaround for this. It won't help for columns that already exist but when creating columns, create them with no spaces (ex, "BusinessUnit"), then edit the column to add the space. The internal name will remain as first created. Also you can control this if you create the field programmatically.

| improve this answer | |
  • 2
    Yeah, that works. Although this begs another question. If you have a system that's complex enough for documentation, you really should have a development process more sophisticated than creating everything through the browser. But that's another story I guess :) – Derek Gusoff Jan 3 at 13:54
  • 1
    Thanks, and yeah, it really is another story...believe me. – adams-j Jan 3 at 14:11
  • 1
    Recently, I have noticed that SharePoint online does not replace white spaces with "x0020". If you create a column with name "Customer Name" for instance, the internal name gets stored as "CustomerName". Kudos to Microsoft for saving us some clicks. – Donspeck Jan 3 at 16:45
  • 1
    @adams-j if you are creating documentation that instructs users on how to create columns, perhaps it's a good opportunity to introduce some "best practices" and try to instruct the users to create the columns without spaces at first, to avoid the encoded internal names in the first place. I have tried to do that as often as possible, even though they eventually forget and continue to use spaces on initial creation... :( – Dylan Cristy Jan 3 at 18:27
  • 1
    Also important not to use special characters like apostrophe or slash. And don't start a column name with a number. We say only upper and lower case, no space or other character. Numbers are fine, but not as the first character. After that go back and rename the friendly name. Sometimes there are things that start as simple lists and then develop into something more with client-side-rendering or what not. – Rothrock Jan 6 at 15:52
1

SharePoint indeed converts spaces to x0020 for internal names, because this is supposed to represent the url encode %20 (aka space). The “x0020” in the field name is the url encoded representation of the space in between of both words. To be more precise it is a form of unicode url encoding. The Unicode encoding of the space is “%u0020” but for fields “x0020” is required. To transform the encoded field name to a proper SharePoint internal field name we need to transform the encoded space somehow.

| improve this answer | |
1

if you create a column with space you will end up with x0020 as internal name if you are using UI use ColumnName insted if you are using XML Column use internalName and staticName property

| improve this answer | |
0

it's quite simple, if you use url encoding for the "space", you will have "%20" right? so when you create a column in SharePoint it will automatically replace the space by "x0020".

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.