Click here to Skip to main content
Click here to Skip to main content

SharePoint Quick Start FAQ - Part 5

, 3 Mar 2014
Rate this:
Please Sign up or sign in to vote.
Custom columns, content types, and the document list library.

Table of contents

Introduction

This is the fifth tutorial of the SharePoint FAQ series. This part will mainly concentrate on custom columns, content types, and the document list library. I am sure once your read this article, your thinking of how SharePoint organizes document centralization will change.

For the past few days I have been writing on and recording videos on SharePoint, Design Patterns, UML, FPA, Enterprise Blocks, and lot more, you can watch the videos here.

You can download my 400 .NET FAQ eBook from http://www.questpond.com/SampleDotNetInterviewQuestionBook.zip.

SharePoint is about centralizing documents, how similar is it to a Windows folder?

As discussed in the previous questions, SharePoint is all about centralizing documents. Consider the below company example where the CEO’s computer, accountant's computer, sales person's computer and the customer personal PC are storing documents in their own personal folders. The way they send documents to each other again varies from person to person.

SharePoint centralizes everything in a central server. So with this approach, we do not have different copies of a document scattered in personal PCs. The most important point is the backups and versioning can now be managed through the central server.

Consider the below figure which shows a simple folder with ‘Courses’ as the top folder which then has ‘networking’ and ‘programming’ folders. The ‘programming’ folder has ‘dotnet’ and ‘java’ folders which have a Word document ‘SharePointFoBeginners.doc’.

Below is just a zoomed picture of the folder structure we saw above.

So if we want to implement the same in SharePoint:

Step 1: Click on the right side ‘Site actions’ menu and click on ‘Site Settings’.

Step 2: You will be shown a lot of options, click on ‘Site libraries and lists’ and then click on ‘Create Content’.

Step 3: You will then be popped up to create a page. We will select ‘Basic page’ for our current situation.

Step 4: Give a page name and click on ‘Create a new document library’. The document library helps us to provide the necessary folder structure and document centralization.

Step 5: We need to specify a name for the document library. We will specify the name ‘Courses’ because that will be the folder name for the top folder.

Step 6: Once you click on Create, you will see the courses directory at the right hand side of the quick launch menu.

Step 7: So we have repeated Step 6 and created our folder hierarchy. Now we can upload a document using the upload document feature as shown in the figure below.

Once the document is uploaded, you can see the document with the folder structure as shown below. The folder structure below represents your Windows folder structure exactly.

In case you want to have a Windows Explorer look and feel, click on Action and click on Open with Windows Explorer.

You can see the exact Windows folder look and feel of your SharePoint documents.

Can we add custom fields to our document library documents?

Organizations normally have 1000’s of documents and at some point of time, it becomes difficult to search and organize these documents. In our previous example, we had created a document library where SharePoint has only given four fields. Now if you want to add a new field called department, with this, we can filter out which document belongs to which department.

To add a custom column, click on Settings and click on Create Column as shown in the below figure.

You will then be popped to specify a name for the custom column. For the current scenario, we name it ‘Department’.

Once you click OK, you can see the newly added custom column.

If you want to specify data in the custom column, click on the document and click the Edit properties menu as shown in the figure below.

You can now specify the department name.

You can now use the custom column for search and for applying filters.

What are the available content types in SharePoint?

Content types are extensions to custom types. Content types bring in central control and consistency on a custom data type. For instance, in the previous example, we added a custom type ‘Department’. Now someone can add a custom field ‘Dept’. In other words this can bring in inconsistency and we will not be able to query and filter data in a consistent manner. In other words, we can define a content type and then apply this content type across documents. We can really drive organization level policies using content types.

To create a content type, click on Site action – Site settings – from the Galleries section, click Site content types, and you will be shown a list of the existing content types.

To create a new content type, click Create hyperlink from the same screen which shows the list of content types.

You will be shown a screen where you need to specify the name of your content type, the parent content type, and the group.

Once the content type is created, you can add new columns using the link ‘Add from new site column’. Our custom type inherited from document content types, so it has two properties: name and title. We also added ‘DepartMentName’ as a custom column in the content type.

You can add new columns using ‘Add from new site column’. We added the ‘departmentname’ custom field for the current instance. The figure below shows the different options and data types for custom columns which are added.

OK, now it’s time to apply this content type to our document. Click on the Settings menu and then click on ‘Document library settings’.

You will be popped up with the details of the content type. Click on ‘Add from existing site content types’ and select the custom content type we just created, i.e., ‘MyContentTypeForDocuments’.

You can now select the content type for your document library.

You can see how our custom content type is seen when we try to upload the new document.

If you edit the properties, you can see the ‘departmentname’ custom column in your content type.

What’s the difference between content and custom columns, do they do the same thing?

Custom columns can be added by the end user and the end user can make mistakes. For instance, someone can add a custom column ‘Dept’ and someone can add a column ‘Departmentname’. Content defines a document data type. For instance, your invoice content type can have an invoice number, invoice amount, etc. Your sales content can have sales date, customer code, etc.

In other words, content type helps you to force organization level policies. So you can define a content type at the site level. When a user wants to create a document library, he can use the appropriate content type. Let’s say the organization wants to implement a policy saying that every document should have a department name and a version number. The SharePoint administrator can create a content type called ‘CompanyContentType’ and all the document libraries can use this content type.

You can use custom columns where a column is very specific to the document library and will not be repeated. If you want to implement document level policies and fields across an organization, you can use content types.

Can you elaborate more on List and Content Types in SharePoint?

SharePoint is all about data and collaboration of data between different types of users. When we talk about data, it varies from user to user and different types of meta-data. For instance, below we have four kinds of users: project manager, accountant, security personnel, and HR.

All these four users have different kinds of data formats. For instance, the accountant needs to save data with different data types and fields like voucher number (20 character string), voucher date (MM/DD/YYYY), debit (Boolean true), credit (Boolean false), and amount (double). The security needs in-time, out-time, items carried, and biometrics data.

In order to bring a flexible collaborative data model which can be further extended, SharePoint brings in something called List and Content Types. Data visualized in terms of List data is shown below. With this approach, you can add more fields and content types on a needed basis.

The best part about organizing data in a list is the amount of flexibility and extensibility we can have. Some of the flexibility a list type of approach brings in are given below:

Different views of the list

For instance, an employee list can be viewed employee wise or date wise.

Create content from external list storage

You can take Excel and instruct SharePoint to create a list of that type.

Which are the various readymade list types that SharePoint provides currently?

There are approximately thirteen different readymade list types, below mentioned are some of the most used ones.

Document library

Used for collaborating on documents with support for versioning, check-in and check-out, and workflow. Includes support for deep integration with Microsoft Office.

Form library

Used to store XML documents and forms for use with Microsoft Office InfoPath.

Wiki page library

Used for collaborative Web pages based on Wiki pages, which are dynamically generated and collaboratively edited Web pages.

Picture library

A specialized document library enhanced for use with pictures. Includes support for slide shows, thumbnails, and simple editing through Microsoft Office Picture Manager.

Announcements

Used for simple sharing of timely news with support for expiration.

Contacts

A list for tracking people and contact information, with support for integration into Microsoft Office Outlook and other WSS-compatible contacts applications.

Discussions

A simple list for threaded discussions with support for approval and managing discussion threads.

Links

A list for managing hyperlinks.

Calendar

A list for tracking upcoming events and deadlines. Includes support for integration and synchronization with Office Outlook.

Tasks

A list of activity-based items that can integrate with a workflow.

Project tasks

An enhanced tasks list with support for Gantt chart rendering and integration with Microsoft Office Project.

Issue tracking

A list for tracking issues and resolution, with support for prioritization.

Custom list

An empty list definition for extending with custom columns, or created using Microsoft Office Excel spreadsheets.

Previous SharePoint QuickStart FAQ

  • Quick Start FAQ Part 1: 11 basic FAQ questions, must for every newcomer. It's the basic Quick Start FAQ tutorial which talks about SharePoint, WSS, MOSS, Site/Site collection, Virtual Path provider, and then ends with explaining SitePages and Application pages.
  • Quick Start FAQ Part 2: This is the second part in the series which explains ready made functionalities, custom pages, deploying/activating/deactivating features, and lots more.
  • Quick Start FAQ Part 3: This is the third part of the series which explains page templates, page instances, WSS model, safe mode processing, and deploying custom controls.
  • Quick Start FAQ Part 4: This series is all about webparts, webparts, and webparts.
  • Quick Start FAQ Part 6: This series is all about workflows, workflows, and workflows.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Shivprasad koirala
Architect http://www.questpond.com
India India

I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small
E-learning company in India. We are very much active in making training videos ,
writing books and corporate trainings. Do visit my site for 
.NET, C# , design pattern , WCF , Silverlight
, LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server  training 
and Interview questions and answers


Comments and Discussions

 
GeneralSimple and Nice Articles PinmemberSahil Mumbai9-Apr-09 3:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 4 Mar 2014
Article Copyright 2009 by Shivprasad koirala
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid