Friday, December 6, 2013

#SharePoint | Change Settings of Calculated Column

It seems that, starting SharePoint 2010, some Site Column types do not allow changing the Column Settings to "Required", "Optional" or "Hidden", through the UI (browser), as they are greyed out.
One of these types is the Calculated column.

This seems to be by design, a feature they say, probably a bug the way I see it.
Anyway, the same thing can be done through SharePoint Designer or PowerShell.


If we open the List, go to the Content Type and go to Edit content type columns we will get to the view below. Although the calculated columns are grayed out as well, we can click the property until the dropdown menu appears, select the new property, and save the changes.

1/ Open SharePoint Designer 2010.
2/ Open the website that contains your list with the calculated column.
3/ Click on "Lists and Libraries" in the left column (under Site Objects).
4/ On the right, click on the list that contains your calculated column.
5/ Under "Content Types", click on the content type where you want to hide the calculated column
6/ In the content type screen, click "Edit content type columns" under "Customization
7/ In the column "Property", try clicking a few times on the "Optional" value until it changes into a dropdown list.
8/ Select "Hidden" from the dropdown list.
9/ Save your changes.


A simple PowerShell script can also work by setting the visibility for each form type.

$list=$web.Lists[“ ”]
$field=$list.Fields[“ ”]


No comments:

Post a Comment