The problem:
You want to create column with a specific name in SharePoint but SharePoint gives you the message "The column name that you entered is already in use or reserved. Choose another name."
Why this is a problem?
Because you need to create custom columns and content types using the default SharePoint interface.
And the business users have to see properly named columns - for example "Description", not "My Description".
Solution:
It is important to know something technical about SharePoint (versions Office 365, 2013, 2010):
- it supports columns with same Display Names.
- you can’t have columns with same Internal names
Let’s implement the following common scenario:
You are creating a SharePoint customization and you need the following column:
Type: Multiple lines of text
Internal Name: MyProjectDescription
Display Name: Description
Here is the correct way to achieve it:
1. Create the column MyProjectDescription.
This will create column with Internal Name: MyProjectDescription and Display Name: MyProjectDescription
2. Rename the column to “Description”
a. Edit the column MyProjectDescription
b. Run in the browser the following script:
c. Click Save
(This will change only the Display Name. Internal Name can’t be changed once the column is created)
And the result is :
Be Careful!
There are several places where you need to use the Display Name of the column. So having columns with same display names may confused the inexperienced SharePoint users.
An example of such place is the formula of Calculated column.
You want to create column with a specific name in SharePoint but SharePoint gives you the message "The column name that you entered is already in use or reserved. Choose another name."
Why this is a problem?
Because you need to create custom columns and content types using the default SharePoint interface.
And the business users have to see properly named columns - for example "Description", not "My Description".
Solution:
It is important to know something technical about SharePoint (versions Office 365, 2013, 2010):
- it supports columns with same Display Names.
- you can’t have columns with same Internal names
Let’s implement the following common scenario:
You are creating a SharePoint customization and you need the following column:
Type: Multiple lines of text
Internal Name: MyProjectDescription
Display Name: Description
Here is the correct way to achieve it:
1. Create the column MyProjectDescription.
This will create column with Internal Name: MyProjectDescription and Display Name: MyProjectDescription
2. Rename the column to “Description”
a. Edit the column MyProjectDescription
b. Run in the browser the following script:
function ValidateAndSubmit() { return true; } function doesFieldNameConflict(strName) { return false; }
c. Click Save
(This will change only the Display Name. Internal Name can’t be changed once the column is created)
And the result is :
Be Careful!
There are several places where you need to use the Display Name of the column. So having columns with same display names may confused the inexperienced SharePoint users.
An example of such place is the formula of Calculated column.
Comments
Post a Comment