Partilhar via


Updating Site Columns

Applies to: SharePoint Foundation 2010

If you make changes to a site column, you can update all the list columns based on that template. This is done by pushing down the changes you made to the site column. A list column retains the same column ID as the site column on which it is based; when you push down the changes to a site column, SharePoint Foundation identifies all the list columns based on that site column and updates them.

There is no granularity when pushing down site column changes; the entire list column definition is overwritten with the current site column definition. This means that any changes you have made to the list column are overwritten.

Unlike content types, you cannot create a site column based on another site column.

Pushing down is not an all-or-nothing operation: if the push down of changes fails on one list, SharePoint Foundation continues pushing down the changes to the remaining lists. SharePoint Foundation returns a list of errors encountered at the end of the push-down operation.

Note

To create or manage a site column on a site, you must have Web Designer access rights to that site. If you do not have the appropriate access rites to a child site, push-down operations to columns contained in that child site fail.

Updating Site Columns Programmatically

To make changes to a site column programmatically, write code that updates the site column, and then call the Update method. This method contains a parameter you can use to specify whether you want to push those changes to the list columns based on the site column.

Storing Updates to Columns

SharePoint Foundation never writes changes made to a site column back to the site column definition itself. Instead, SharePoint Foundation stores updates made to site columns as entries within the SharePoint Foundation database.

All list columns are stored as entries within the SharePoint Foundation database. This is because when you add a site column to a list, SharePoint Foundation copies the site column definition locally to the list as a list column. For more information, see Introduction to Columns.

See Also

Concepts

Introduction to Columns

Adding Columns in Content Types to Lists

Introduction to Content Types