Archive for September, 2008
Calculated fields is in my opinion, one of the least used or even understood features of SharePoint. It could be because it’s not easy finding examples or information on how to build calculated fields in SharePoint. A good starting point for anyone wanting to get comfortable using calculated fields is available directly from the Office Online web site located here or the WSS 2.0 Help located here. Disregard the fact that it’s a WSS 2.0 resource, the calculated fields haven’t changed all that much and I find that most of these forumulas work in WSS 3.0 instances as well.
Some Examples:
The formula below will start from the left of the First Name column and grab the first letter.
=LEFT([First Name],1)
The formula below will calculate the difference in days between two dates. This can be particularly useful if you want to calculate how long something took to complete.
=DATEDIF([Start Date], [End Date],”d”)
Please note that if your column name has any spaces between it, you will have to use square brackets as indicated in my examples above. If there is no space, you can simply replace Column1 that you’ll find in most examples, with the name of your column.
I encourage everyone to take a few minutes and experiment with these fields to get a good handle on what’s possible. If you’re working on building a calculated field that you’re having trouble with, please drop me a note and I’ll see if I can help.
Microsoft released a while back some sample master pages for use within your WSS 3.0 site. I was recently doing a demo where I had to set this up and found that the instructions were not complete. Follow the directions below to get this setup for your team site.
1. Download the sample master pages from the Microsoft site. Download Here
2. Double click the .exe file and extract the contents of the archive somewhere on your local computer.
3. You will need SharePoint Designer to make these changes, so launch SharePoint Designer and open the site that you want to customize.
4. There are 3 key sets of files that will need to be added to the site. We’ll start with the master page. Expand the catalogs folder and highlight the masterpage folder. When you’ve got the masterpage folder highlighted, click on the File menu, select Import, File. On the Import dialog box, select Add File. Locate the masterpagesamples folder you should have already extracted in step 2. Select one of the master pages. For this example, we’ll navigate within the masterpagesamples folder, into the block folder, then _catalogs, masterpage and select block lay4 blue.master.
5. Once you have the master page uploaded you should see it at the same level as the default.master. The next step is to upload all the images and style sheets necessary for this customization to work. Click on the images folder to highlight it. Repeat step 4 for all the files associated with the block lay4 blue.master master page:
- lay4 blue hover.gif
- lay4 blue logo.gif
- lay4 blue nav_bg.gif
- lay4 stock.jpg
- questionMark.gif
6. Finally, we want to add the style sheets necessary to bring this all together. If you don’t have a styles folder created at the top level of your site, go ahead and create one within SharePoint Designer. If you’ve got your top level site highlighted, click on File, New and select Folder. Name the folder styles. Within the styles folder, repeat step 4 to upload the styles sheets for this master page:
- color layout4 blue.css
- template layout4.css
7. Once you have all that in place, right click on the block lay4 blue.master and select Set as Default Master Page. That should do it. Save your site and load in the browser. Any issues, let me know.
