web analytics
System Column Names in SharePoint and Microsoft Lists
Microsoft 365,  SharePoint,  SharePoint Online

System Column Names in SharePoint & Microsoft Lists

Have you ever created a column in a SharePoint list or library and noticed that the system name is different from the name you gave it? This is because column names in SharePoint have a system name that does not include spaces. Instead of spaces, the system puts “_x0020_” in the names users give initially. So, if you create a column named “Product Owner,” the system name for that column would be “Product_x0020_Owner.”

To avoid any confusion, it's best to follow a simple best practice: don't use spaces when creating columns in lists and libraries in SharePoint and Microsoft Lists. Instead, create the column without spaces and then edit the column properties to add spaces for user usability.

Finding System Column Names

But what if you need to find the system names for columns in libraries and lists? There are a couple of ways to do this. You can use PowerShell to retrieve the system names, or you can manually edit the column properties and find the information in the URL in the browser. Both methods are effective and can help you find the system names of your columns. To get the system column name while in a browser:

  1. Navigate to the SharePoint list or library where the column is located.
  2. Click on the settings gear in the top right corner of the page and select “List settings” or “Library settings” from the drop-down menu.
  3. On the settings page, scroll down to the “Columns” section. Here you will see a list of all the columns in the list or library, along with their display names.
  4. Click on the name of the column you want to find the system name for. This will take you to the column settings page.
  5. On the column settings page, look at the URL in the browser's address bar. The system name of the column will be displayed at the end of the URL, after the “Field=” parameter.

For example, if the URL in the address bar is “https://yourdomain.sharepoint.com/sites/yoursite/_layouts/15/FldEdit.aspx?List=%7B…%7D&Field=Product_x0020_Owner“, then the system name of the column is “Product_x0020_Owner”.

System Column Names in SharePoint in URL

It's also worth noting that using column names in SharePoint without spaces when initially created can have other benefits. For example, it can help when using Keyword Query Language (KQL) in web parts, performing searching in Microsoft Search, and even in Microsoft Purview activities. By following these best practices, you'll be able to keep your SharePoint lists and libraries organized and easy to work with.

Using PowerShell to Find System Names

You can use PowerShell to retrieve the system names of SharePoint columns. Here is an example script that you can use to retrieve the system names of columns in a SharePoint list:

# Add references to SharePoint client assemblies and authenticate to Office 365 site
Add-Type -Path “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll”
Add-Type -Path “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll”

# Specify the credentials for the account that will be used to access the SharePoint site
$Username = “USERNAME”
$Password = “PASSWORD”
$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
$Creds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $SecurePassword)

# Specify the URL of the SharePoint site and the name of the list
$SiteURL = “https://YOURDOMAIN.sharepoint.com/sites/YOURSITE”
$ListName = “YOURLIST”

# Connect to the SharePoint site and retrieve the list
$Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
$Ctx.Credentials = $Creds
$List = $Ctx.Web.Lists.GetByTitle($ListName)
$Ctx.Load($List)
$Ctx.ExecuteQuery()

# Retrieve the fields (columns) in the list
$Fields = $List.Fields
$Ctx.Load($Fields)
$Ctx.ExecuteQuery()

# Display the system names of the columns in the list
foreach ($Field in $Fields)
{
Write-Host $Field.InternalName
}
“`

Make sure to replace the `USERNAME`, `PASSWORD`, `YOURDOMAIN`, `YOURSITE`, and `YOURLIST` placeholders with your own values before running the script. This script will retrieve the system names of the columns in the specified SharePoint list and display them in the PowerShell console.

Note the PowerShell script has AI Generated portions and should be edited as appropriate. 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.