There is a lot to talk about site columns and content types and how easily many ignore its power (including me). You can read tons of it online but, in my opinion you will never really realize its importance unless you have had your own “tryst” with them.
Let us look at a requirement that i faced and how i tried to solve it using site column and content types. Lets get cracking!
Imagine a site structure like the one show below.
We have a site collection (Root Site) and projects divided across sub sites. Each project is handled by 3 departments which are sub sites in turn.
Each of the sub-site (Dept I, Dept II, Dept III) has one master list. This master list contains all the planned items that are to be uploaded for a project. Every time a document is uploaded into a document library the item is tagged against one of the items in the master list. (Think lookup column)
Note that there are going to be additional projects over a period of time. Number of departments handling a project might increase / decrease. We need a way by which, a new department can be configured by just clicking a few buttons and getting the job done.
1. There was going to be only one master list per department. All libraries within this site will have a lookup column to this master list.
2. Since there is only one master list we need to filter the items to show only those that belong to the library the document is being uploaded to. To explain the same in a little more detail, consider this, the master list has 10 items items. Items 1-5 are items that need to show up in the lookup column of Library 1. Items 5-10 need to show up in the lookup column of Library 2. (Think SP Services for filtering.)
1. Develop everything in Visual Studio – We need to be able to add new projects and departments without having to reconfigure everything. Essentially, activate a couple of features and get done with it.
2. Organize everything in content types and site columns since we would need to reuse many of them. Also, if we at a later date go under some change in the master list we need a way to propagate those changes to all master lists at once.
In Part 2 we will start developing the solution. We will run over SP Services, a few pitfalls to take care while making site columns and content types and how to customize an edit form of a document library.