Question

I am working on a SharePoint server 2016. and using the UI i create a new site column named 2016Summary. now i have noted that this column will have this strange internal name %5Fx0032%5F016Sumamry which is _x0032_016Sumamry if i decode it.

So can anyone advice on these points:-

  1. Should i avoid having site column names which contain numbers?

  2. Now i tried using PowerShell to create the column (instead of using the UI), and i was able to create the site column with 2016Summary internal name... so i am not sure what is going on.. and if i should avoid doing so in powershell ??

  3. If i create a new site column with the following name Summary2016 i will get the correct internal name ... so is the problem that site columns should not start with a number, but it is fine if the other characters are numbers??

Can anyone advice on the below please?

Thanks

Was it helpful?

Solution

When you create a column name beginning with numbers in UI , SharePoint converts it internally as below:

_x0032_ + Rest of the field name beginning with second digit.

To answer your questions

1) Avoid column names beginning with numbers as general thumb rule/practice. If you must, then use Powershell to set internal name/display name.

2) Powershell/SSOM/CSOM works differently compared to UI as you have access to schema XML. Hence, you dont face this issue of weird internal column name. As mentioned above, as a practice dont use numbers as starting characters in the column name.

3) It's fine if other characters are numbers.

OTHER TIPS

I know this is an older issue but as of today Feb 2019 in SP online version, when I create a new SITE COLUMN like AG01 then it becomes _x0041_G01

Not sure why it converts the first character into a unicode character.

One way I was able to get the internal names of the columns:

https://<sitepath>/_api/web/lists/getbytitle('myListName')/fields.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top