How to find the internal name of list or library columns

This post is a guide on how to find the internal name of columns within Microsoft lists or document libraries in SharePoint.


In this post:

Intro
Option 1: list/ library settings
Option 2: sort or group by the column
Option 3: REST API request
Option 4: Microsoft Graph Explorer

Intro

Columns in Microsoft Lists/ SharePoint lists & libraries have two main names – their display name that you can see within the list or library and their internal name. Sometimes you may be required to use a column’s internal name (for example: when creating column/list view formatting). There are several ways to do this, depending on the column so take a look below for more:

NOTE: In the examples below I will be focusing on lists, but the same applies for document libraries.

Option 1: list/ library settings

This is by far the easiest way to get the internal name of a column. All internal custom columns, plus several of the out-the-box column names within lists or libraries can be found by heading to list settings and clicking on the column itself:

  • Press the cog > list/ library settings
Press list settings from the cog menu.
  • Scroll down until you see columns > select the column
  • The Field= end part of the URL in the browser will show you the internal name of your column (Modified By in my example)
Editing the column will show you the internal name of the column from the Field= part at the end of the URL .

Option 2: sort or group by the column

Some out-the-box columns don’t appear within list settings, but you can still get their internal name by either grouping or sorting based on the particular column. For example, the file size column is an out-the-box column that isn’t you won’t find in list settings. If you add this column to your list/ library view and sort you can get access to the internal name:

  • Click on the drop-down and press show/ hide columns
  • Select the column you wish to add > tick it > press apply
  • Select the drop-down next to your newly added column > either sort by or group by depending on what is available
    • For sorted columns – look for the sortField part of the URL to get the internal name of your column
URL example to find the internal name of sorted columns
  • For grouped columns – look for the groupBy part of the URL to get the internal name of your column
URL example to find the internal name of grouped columns.

Option 3: REST API requests

SharePoint has a REST API service that allows you to perform CRUD operations by using REST HTTP requests. There is much more information about the SharePoint REST service here, but you can use GET requests via the browser to return information as per your requirements.

In our example, we want to return all the internal column names from a given list. To do this we simply need to send a REST request to SharePoint as follows:

https://[YOUR SITE].sharepoint.com/_api/Web/Lists(guid'[YOUR GUID]')/Fields

This will return a huge wall of text, but if you CTRL+F and search for the name of your column or use a code editor you will find the internal name and display name:

Option 4: Microsoft Graph

You can also use the MS Graph Explorer to do something similar to a REST API request. The graph explorer allows you to create a run requests via an easy to use interface that also shows you the results. In our example I ran the following GET request via graph explorer:

https://graph.microsoft.com/v1.0/sites/[YOUR TENANT].sharepoint.com/sites/[YOUR SITE]/lists/[YOUR LIST]/Columns
Entering the above request in Graph Explorer will return you all the internal column names in your list.

Which allowed me to look through the response preview to find my file size column’s internal name:


Advertisement

How to remove commas from number columns in Lists

This article describes how you can remove commas (thousand separator) from number columns in Microsoft/ SharePoint Lists.

Introduction

You may have noticed a comma or thousand separator appearing when using the number column in Microsoft/ SharePoint Lists. Commas appearing in number columns in SharePoint have been a long-standing issue, going back as far as SharePoint 2010 and beyond.

In classic SharePoint, a common way to solve this problem was to convert the number column into a text column and validate it to remove commas using a formula such as =ISNUMBER([ColumnName]+0). However, with modern SharePoint, plus the advent of Microsoft Lists it’s now become easier to manipulate columns using column formatting to achieve the desired result.

I personally encountered this issue when importing data from excel into a modern SharePoint list. In my situation, the preview offered when importing from Excel did not show the commas in my data. It was only once it was imported into SharePoint that the commas appeared.

Remove commas from number columns

  • Left-click on your number column
  • Under Column Settings > select Format this column
  • Ensure the Format Columns tab is selected, scroll down and press Advanced mode
  • Remove the text from the box and add the following JSON:
{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "div",
  "attributes": {
    "class": "=if(@currentField > 0,'', '')"
  },
  "children": [
    {
      "elmType": "span",
      "style": {
        "display": "inline-block"
      }
    },
    {
      "elmType": "span",
      "txtContent": "@currentField"
    }
  ]
}

  • Press Save
How to add JSON formatting to number columns to remove commas.

Note

Microsoft added roadmap item 68716 in October 2020 for Microsoft/ SharePoint lists to include support for thousand separator in number columns. As this time of writing, the roadmap states this feature is due for release in June 2021 which will allow List owners/ members to choose if the comma should appear or not.