If you want to change the display name of one of the columns that you use within MetaShare, the recommended method to start with is to use SharePoint’s standard browser interface (method 1 below). If standard SharePoint does not permit you to change the name, due to name conflict, you could use method 2.
Method 1 – Using SharePoint’s web interface
This is method is straightforward and does not require any scripting.
- Open the content type that is used in the workspace.
- In the new window that open up, click on the column that you want to rename, in this case “Project phase”:
- Click on the link “Edit site column”:
- Change the name of the column in the “Column name” field and then scroll down to the bottom of the page and click on the “OK” button:
If you get this warning message:
Try again by adding an extra space in the end of the name. If this still does not work, then you will need to use PowerShell to change the name (see method 2 below). - Click on the “OK” button on this page:
- Republish the changed content type.
Method 2 – Using PowerShell
If you are unable to rename a SharePoint column using SharePoint’s web interface, you will have to do it using PowerShell by following these steps:
- Open PowerShell (click on the computer’s start button and type “PowerShell”) and start the application.
- If you haven’t installed PowerShell’s PnP module yet, install it by following these https://pnp.github.io/powershell/articles/installation.html.
- Connect to SharePoint’s content type hub by writing this command (replace “yourtenant” with your tenant):
Connect-PnPOnline –Url https://yourtenant.sharepoint.com/sites/contentTypeHub -Credentials (Get-Credential)
If you use multi-factor authentication on your tenant, you need to use this command:Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/contentTypeHub -UseWebLogin
You will be prompted to login: - Rename the column by writing this command:
Set-PnPField -Identity "Column's-Internal-Name" -Values @{ Title = "The column's new display name" }
E.g.:Set-PnPField -Identity "Area" -Values @{ Title = "Process" }
- Republish the changed content type.