- After you created and customised the list, if you think ahead a little bit. In a couples of years time, people will make a few dozen lists and they do that by modifying the columns of every single of our lists. They're going to adding columns, take some columns out, change the display names etc. If then you need to do some ETL jobs to pull that data from Sharepoint to an enterprise data store. You look at the data, you will see that a column in one list might be called another name in another list, but they're essentially the same thing. That's where site columns are used to solve this kind of problem.
- Site columns are for common columns reuse.
Column Types
- Types available via the Web UI
- Single line of text
- Multiple lines of text
- Choice (menu to choose from, can be rendered as drop down or radio buttons)
- Number (integer, decimal, double, float, all represented in Sharepoint UI as Number)
- Currency
- Date and Time (Date or Time or DateTime)
- Lookup (information already on this site contained in another list)
- Yes/No (check box)
- Person or Group (pulls from user store)
- Hyperlink or Picture
- Calculated (calculation based on other columns)
- SharePoint list do not truly support joins and foreign key relationships. However, the Lookup type allows a column to get its value from another list on the site. If those values get updated, any associated Lookup columns will also be reflected.
Built-in Site Columns
- Viewable via the Site Column gallery
- Organized into groups
- Base
- Contact and Calendar
- Document
- Task and Issue
- Extended
- _Hidden (not directly visible to users, not displayed in the gallery)
- Generally speaking, any column available in a built-in list template have a corresponding site column. Any column that is not displayed in the gallery, either is in the _Hidden group, or in some case, it has a different display name.
Content Types
- A collection of references to site columns
- Content types are not only a collection of references to site columns, you can also associate a content type with forms. For example, custom task forms for workflows. Far easier than associate a form with list template.
- The building blocks of all the built-in lists and libraries
- When defined by developers
- Can have custom forms
- Event handlers
- Workflows
- Support a form of inheritance
- A content type is a collection of references to site columns as opposed to containing a collection of site columns. By using references, WSS enables reuse of site columns across multiple content types and it also ensures that changes to a site column are reflected across all content types.
Build-in Content Types
- System
- Item
- Document
- XMLDocument
- Picture
- ...
- Event
- Issue
- Announcement
- Link
- Contact
- Message
- Task
- WorkflowTask
- AdminTask
- ...
- Each node inherits from its parent type, so every type is therefore an item and includes the items type reference to a base site column called title. Picture and XMLDocument both reference all of the site columns used by Document. When defining a new content type, a good practice is to base on the type that the new type most closely resembles.
Lists and Content Types:
- The following shows a list of the built-in Sharepoint Lists and the content types they use.
- Document Library - Document
- Form Library - XMLDocument
- Wiki Page Library - WikiDocument
- Picture Library - Picture
- Announcement - Announcement
- Contacts - Contact
- Discussion Board - Discussion
- Links - Link
- Calendar - Event
- Tasks - Task
- Project Tasks - Task
- Issue Tracking - Issue
- Survey - N/A (because every survey is different)
- Custom List - Item