Knowledgebase:
SharePoint List Display Name and Internal Column Name Exporter
Posted by CIRRUS SOFT SUPPORT, Last modified by CIRRUS SOFT SUPPORT on 20 December 2018 01:12 PM
SharePoint List Display Name and Internal Column Name Exporter PowerShell Script

In a SharePoint list, we usually use the user friendly (readable) names in list columns or fields. Each column has a display name and internal name which we also call as physical name of the column / field.

There are not many options for how to get the internal name and the easiest way is to copy it from the query string. This can be time consuming and error prone especially when working with many columns in a list.

The following PowerShell script will Export the SharePoint Column Display Name and Internal Name into a text file. This can then be used to create your document templates for SharePoint Document Merge or for any other Internal Column Name requirements (workflow, triggers etc...)

SharePoint Online: https://sharepointdocumentmerge.com/powershell/Get_list_columns_internal_names_SharePoint_Online.zip

SharePoint On-Prem: https://sharepointdocumentmerge.com/powershell/Get_list_columns_internal_names_SharePoint_On-Prem.zip

------------------------------

SharePoint Document Merge is the simple, fast and clean way to merge SharePoint list data into predefined Word, Excel and PowerPoint document templates with NO CODE!

Microsoft AppSource: https://appsource.microsoft.com/en-gb/product/office/WA104379659?tab=Overview

More Information: https://sharepointdocumentmerge.com

Internal column names are used to setup Word, Excel and PowerPoint Templates to automatically generate documents from SharePoint list data.

----------------------------

This can also be achived with the following JavaScript;

async function GetFields(listTitle){
    let data = await fetch(`${_spPageContextInfo.siteServerRelativeUrl}/_api/web/lists/GetByTitle('Users')/Fields?$filter=Hidden%20eq%20false`,
    {
        headers: {"Accept":"application/json;odata=verbose"}

    });
    let fields = await data.json();
    console.log(fields.d.results.map(field=>`${field.Title} | ${field.InternalName}\n\r`).join("") );
}

// pass the list name:
GetFields("Users")


https://gist.github.com/Zerg00s/ad42316c9b1ee9d7a99087b62f39751d#file-getfieldnames-js (Credit Denis Molodtsov)


Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: