SharePoint 4 Developers

Additional reference guide in .NET / SharePoint Development

Lesson 1 - Core SharePoint Features – Part III

This post is the continuation of the lesson Core SharePoint Features. We are going to see definitions, types and an example of how to create Columns.

Hi folks,

This post is the continuation of the lesson Core SharePoint Features. Today we are going to see definitions, types and an example of how to create Columns.

It contains many figures that facilitate the understanding and learning.

Let´s go to another post belonging to this series!

Site Columns

Site Columns are column definitions that can be assigned to multiple lists across multiple SharePoint sites (available at the scope of Site Collection).

Due to the fact they are shared, Site Columns eliminate the need to create repeated columns (redundancy) in each site, ensuring consistency of column metadata. However Site Columns can be copied to Lists and then to belong exclusively to the List, becoming List Columns.

Site Columns and List Columns can be added to Content types*.

Keeping up with our example started in the previous post, now we´re going to create a column called FileType in the library VIDocs, which will contain the definition of the file type that was created or uploaded.

Every time you create a column to your list, preferably add a column based on an existing column, through Settings > Document Library Settings > Add from existing site columns. If the column doesn´t exist (as in this case), firstly we must create the site column and then add it to our library.

In order to create the column go to Site Actions > Site Settings > Site columns (under Galleries), according Figure 1 and 2.

1D806A05AA43783B_204_0[1]
Figure 1 – Site Settings Menu

1D806A05AA43783B_204_1[1]
Figure 2 – Site Settings

Click Create.

1D806A05AA43783B_204_2[1]
Figure 3 – Site Column Gallery

Next step is the column creation, however the selection of the column type to our example is needed. Table 1 displays the existing column types available in SharePoint and their features.

Coluna

Descrição

Single line of text

Columns that collect and display small amounts of text in a single line, including text only, combinations of text and numbers, and numbers that are not used in calculations (such as phone numbers).

Multiple lines of text

Columns that collect and display one or more sentences of text or formatted text.

Choice (menu to choose from)

Columns that display a list of options.

Number (1, 1.0, 100)

Columns that provide a box in which you can type a numerical value.

Currency ($,¥, €)

Columns that provide a box in which you can type a monetary value.

Date and Time

Columns that store calendar or time-of-day information.

Lookup (information already on this site)

Columns that make it easy for you to select information that's already stored on a site.

Yes/No (check box)

Columns that store true/false information.

Person or Group

Columns that display the name of users or SharePoint groups.

Hyperlink or Picture

Columns that display a hyperlink to a Web page or display an image from the Web.

Calculated (calculation based on other columns)

Columns that display information that is based on the result of a formula. The formula can use information from other lists and columns, dates, or numbers. You can use standard mathematical operators.

Table 1 – Existing Column Types

In our example the column FileType must be a column of type Choice and have these elements: Word Document, Excel Spreadsheet, Portable Document Format, Text File, XML File and Image File.

Table 2 displays the column settings and figures 4, 5 and 6 display the screenshot details.

Seção

Campo

Name and Type

Column Name: FileType

The type of information in this column is: Choice (menu to choose from)

Group

Existing Group: Custom Columns

Addition Column Settings

Description: Type of the File

Require that this column contains information: No

Type each choice on a separate line:

  • Word Document
  • Excel Spreadsheet
  • Portable Document Format
  • Text File
  • XML File
  • Image File

Display choices using: Drop-down menu

Allow “Fill-in” choices: No

Default Value: Choice (Let the field blank)

Table 2 – Column Settings

1D806A05AA43783B_204_3[1]
Figure 4 – New Site Column (1/3)

1D806A05AA43783B_204_4[1]
Figure 5 – New Site Column (2/3)

1D806A05AA43783B_204_5[1]
Figure 6 – New Site Column (3/3)

Click OK to create the Site Column.

After creating the column, we need to configure our library VIDocs to display it. Open the library and go to Settings > Document Library Settings, according Figure 7.

1D806A05AA43783B_204_6[1]
Figure 7 – Document Library Settings Menu

Then click in Add from existing site columns according Figure 8.

1D806A05AA43783B_204_7[1]
Figure 8 – Document Library Settings

A new page will be displayed to select the column, according Figure 9. Select it and click OK.

1D806A05AA43783B_204_8[1]
Figure 9 – Adding columns from existing Site Columns

This way the column will be added to the library VIDocs. In the Figure 10 we can check out the updated library with the FileType column available (and filled).

1D806A05AA43783B_204_9[1]
Figure 10 – FileType Column

Once the column is created, our example will be used in the next part of lesson 1, which continues in the next post, containing explanations about views.

----------------------------------------------------------------------------------------------------------
content types* - Collection of content settings. (To be seen in another lesson)
----------------------------------------------------------------------------------------------------------

References:
http://msdn.microsoft.com/en-us/library/ms450825.aspx
http://office.microsoft.com/en-us/sharepointtechnology/HA101577691033.aspx
Book: Essential SharePoint 2007 (Addison Wesley Series)
Book: Essential SharePoint 2007, Second Edition (O'Reilly, 2007)

Cheers,

Marcel Medina

Click here to read the same content in Portuguese.

blog comments powered by Disqus