The average user usually doesn’t need to care about ‘internal’ naming on SharePoint lists. They just need to work. But as you start to delve into some customization approaches, trying to piece some details together behind the scenes a bit, you may need to know internal names.
What are ‘internal’ names? They are one of the IDs used by the SharePoint system (other than GUIDs) to refer to columns, fields, etc. They don’t necessarily align perfectly with the user friendly field name that users see.
One instance where someone might need to know the internal name is when dealing with the client-side rendering (CSR) functionality introduced in the 2013 platform. Overriding specific columns requires the internal name.
Finding the internal name thankfully is pretty straightforward. You can find it by going to the List Settings and clicking on the column name you are looking for. The URL will show the internal name at the end of the string:
In this example, the internal name of the field is ‘MoreText’. You can see it there at the end as part of the ‘Field=MoreText’.
Kudos to Raymond for figuring this out while we were digging into CSR…
Any ideas on how to find that internal name programmatically? I have tried everything I can think of. Spent a long time and can’t find it anywhere in the object model!
List lColumnNames = new List();
DataTable table = list.GetItems(list.DefaultView).GetDataTable();
foreach (DataColumn column in table.Columns)
Helped me when working with Client Side Rendering. Thank you
You save me a lot of my time! Thx!