When you add a column to a list, SharePoint Foundation copies the site column locally onto the list as a list column. You can then make changes to the list column; these changes apply only to the column as it behaves on that list.
You can also create your own list columns, directly on a list. Either way, list columns apply only to the list to which you add them; they cannot be added to multiple lists.
You can reference a site or list column in a content type.
|In the SharePoint Foundation object model, and Collaborative Application Markup Language (CAML), columns are most often referred to as fields.|
You can specify the following properties for a column:
- NameThe column name must be unique among all column groups at the scope at which you create it.
- Data typeYou can choose any of the data types SharePoint Foundation supports; for example, single or multiple lines of text, number, currency, date and time, or calculation.
|If you select a lookup data type, the site column behaves as though you are creating it on a list in the current site. You can select any list in the site. If you select a calculated data type, SharePoint Foundation performs no validation on the column formula when you create it. When you add the column to a list, either directly or by adding a content type that contains the column, SharePoint Foundation validates the column as though you were creating the column on the list for the first time.|
- Detailed optional settingsYou can select any other optional settings to apply for the data type you selected.
- Column group to which this column belongsColumn groups are user-defined groups that help you organize your columns into logical categories.
Site columns also behave like site content types in terms of scope. When you create a site column on a site, that site column also becomes available to any child sites, and thereby, the lists on those sites.
Also like content types, site columns are available to all the child sites of the site on which they are defined.
At the site level, the site column collection contains definitions for each site column defined on the site, whether or not it has been added to a content type or list on that site.
Adding Site Columns to Lists
You can add site columns to a list. When you do, SharePoint Foundation copies the site column locally onto the list as a list column. You can then make changes to any of the list column properties you choose. However, when you add a site column to a content type, SharePoint Foundation includes only a reference to that site column in the content type, not the entire column definition. Because of this, in content types you can change only a subset of the column properties, such as the column display name, XML promotion and demotion attributes, and whether the field is optional, required, or hidden.
For more information, see Fields and Field References.
You can also add columns you create directly to lists, as well as create site columns and later add those to a site content type or list. You can also create columns on a list and add those columns to the list content types on that list.
|To create or manage a site column on a site, you must have Web Designer access rights to that site. Specifically, you must have Manage Lists and Add and Customize Pages access rights on the site where the column resides. To add a column to a list, you must have List Administrator rights to that list.|
Referencing Columns in Content Types
You can reference site and list columns in content types. When you reference a column in a content type, SharePoint Foundation adds a reference to the column to the content type. This reference includes the column ID. When you add a content type to a list, the columns referenced in that content type are added to the list as list columns, if have not already been added.
You can reference site columns in a site content type. The site column must be in scope for the content type. That is, the site column must be defined on the same site, or on a parent site of the site content type.
For a list content type, you can reference site columns, as well as any list columns defined on the same list.
In the column reference in a content type, you can override a subset of the column properties, such as the following:
- Display name
- XML promotion and demotion attributes
- Whether the field is optional, required, or hidden
Changing these properties in the column reference changes them only as they apply to the specific content type that contains the column reference.
Interested in mastering SharePoint Training? Enroll now for FREE demo on SharePoint Training.
You can create columns in three ways:
- By using the SharePoint Foundation user interface
- By using the SharePoint Foundation object model
- By deploying a Feature that installs the column based on an XML definition file
For more information, see Using Features in SharePoint Foundation.
In each case, columns created at the site level are site columns, while those created at the list level are list columns.
If a site collection contains lists that contain a site column you want to delete, you cannot delete that site column.
If you delete a column from a list, that column is also deleted from any list content type on that list.
When you delete a column, all data associated with that column is also deleted.
Site Columns: SharePoint 2010 vs. SharePoint 2007
Site columns allow you to create re-usable definitions for columns that can be added to any list across the site collection
When comparing the "create site column" screen of SharePoint 2010 versus the one in SharePoint 2007, the features are mostly similar except for three enhancements in 2010. These include:
1. Column types for Rich Media and Managed Metadata.
2. "Enforce unique values."
3. Column validation.
For Indepth understanding of SharePoint click on