You are currently browsing the monthly archive for September, 2008.

In the interest of sharing, Peter Allen from California has sent me his own implementation of the progress bar for task lists.

I’d be surprised that his example exactly fits your needs, but the purpose here is to show that the method can be pushed far beyond the basic examples I used in my tutorial.

Peter takes into account three fields to build the progress bar: process status (choice), progress (choice) and % complete. Here is the formula:

="<DIV style='background-color:Beige;'><DIV style='background-color:"&IF([Process Status]="0.Not Started","Gainsboro",IF([Process Status]="1.Started",IF(Progress="3-Red","red",IF(Progress="2-Yellow","yellow","ADFF2F")),IF([Process Status]="2.Completed","87CEEB","Black")))&"; width:"&IF([Process Status]="1.Started",([% Complete]*100),100)&"%;'></DIV></DIV>"

The legend at the bottom is plain HTML inserted in a separate Content Editor Web Part:

<SPAN class=style7><STRONG>Legend</STRONG></SPAN><SPAN class=style6>:&nbsp; <FONT style="BACKGROUND-COLOR: #c0c0c0">[&nbsp;&nbsp;&nbsp; ]</FONT> Not Started&nbsp; <FONT style="BACKGROUND-COLOR: #ccff66">[&nbsp;&nbsp;&nbsp; ]</FONT> On Track&nbsp; <FONT style="BACKGROUND-COLOR: #ffff99">[&nbsp;&nbsp;&nbsp; ]</FONT> Early warning of potential risk&nbsp; <FONT style="BACKGROUND-COLOR: #ff5050">[&nbsp;&nbsp;&nbsp; ]</FONT> Serious risk to completion&nbsp; <FONT style="BACKGROUND-COLOR: #99ccff">[&nbsp;&nbsp;&nbsp; ]</FONT> Completed&nbsp; <FONT style="BACKGROUND-COLOR: #000000">[&nbsp;&nbsp;&nbsp;&nbsp; ]</FONT> Excluded</SPAN>

Thanks for sharing Peter!

 

Update [09/30/2008]
Below a second version that displays the % complete value on the chart. Note the use of absolute positioning, so that the value doesn’t interfere with the bar. The formula is written for both Internet Explorer and Firefox.

The formula:

="<DIV style='position:relative; background-color:Beige;'><DIV style='background-color:"&IF([Process Status]="0.Not Started","Gainsboro",IF([Process Status]="1.Started",IF(Progress="3-Red","red",IF(Progress="2-Yellow","yellow","ADFF2F")),IF([Process Status]="2.Completed","87CEEB","Black")))&"; width:"&IF([Process Status]="1.Started",TEXT([% Complete],"0%"),TEXT(1,"0%"))&";'>&nbsp;</DIV><DIV style='position:absolute;top:0px;left:0px'>"&IF([Process Status]="1.Started",TEXT([% Complete],"0%"),"")&"</DIV></DIV>"

Mark Miller at EndUserSharePoint has created an 8 minute screencast that showcases my “HTML calculated column”. The video, called “SharePoint Dashboards – My Task Assignments”, is part of a series about creating dashboard pages.

The other videos of the series are also worth a look, as they’ll give you an idea of what can be done using only the SharePoint UI. What I like in Mark’s screencasts is the combination of a high level presentation with drill-downs that capture key details.

The “HTML calculated column” is a method that allows you to use SharePoint calculated columns to write HTML. It has multiple applications, and can often replace heavier customizations done through SharePoint Designer or programming. The whole series, including the method and various examples, is available on this site:
http://pathtosharepoint.wordpress.com/category/the-html-calculated-column/

In my last post I introduced the URL protocol for SharePoint lists. Today, let’s see how to use it to display a random picture on a page.

You’ll find other examples on the Web that are based on the same principle. Here is a very popular slide show from Todd Bleeker:
http://www.mindsharpblogs.com/todd/archive/2006/12/20/1431.aspx

A major difference with the above example is that my code is cross-browser (IE and Firefox), as is usually the case for the other scripts I publish. In this case in particular the behavior of Internet Explorer 7 is actually closer to Firefox than to IE 6.

Read the rest of this entry »

Here is a game to play with fellow SharePoint addicts (don’t try it with your family…): list all the options you are aware of to retrieve the content of a SharePoint list. This could actually be an interesting way to kick off a SharePoint workshop with advanced users.

For me, the URL protocol of the RPC method is one of the most intriguing. In this post we are going to experiment with it. Then in my next post I’ll put it to work, to display random pictures on a SharePoint page.

Read the rest of this entry »

One principle of Web design is the separation between content and presentation. HTML provides the structure of the page, while CSS (Cascading Style Sheets) tells how it should be displayed.

Themes in SharePoint (Site Actions | Site Settings | Site Theme) are a good example. Changing the theme doesn’t modify the structure of your site, it just changes its look by calling a different style sheet.

One key style property is “display”. By setting its value to “none”, we can hide an element, so that our site visitors cannot access it (though the element actually remains in the page structure). “Display=none” is often used to hide buttons or menu options on a page.

Read the rest of this entry »

In this post I am going to show how to tweak the look of a contacts list using an HTML calculated column.

What makes a contacts list? Usually, you’ll first want to identify the right contact (name, role/responsibilities). Then you need a way to get in touch with him/her, usually through an e-mail address and a phone number. A picture will add a warm touch to the e-relationship you have started…

In my example I have chosen the following behavior:
- on page load, only the full name is displayed
- when hovering over the name, a pop-up displays the picture, the job title and the phone number
- a click allows me to send an e-mail to the contact

Read the rest of this entry »

I have already talked about the popular “Today” trick, and explained how you can get the same result by simply using the [Modified] column:
http://pathtosharepoint.wordpress.com/2008/08/14/calculated-columns-the-useless-today-trick/

I have a strange feeling about this. People who have been using this trick for years don’t believe me (which makes me doubt), but at the same time they can’t prove me wrong.

Anyway, let’s move on and review the “Me” trick.

Read the rest of this entry »

I hope you have found some useful applications of my previous posts and created a couple lists relying on HTML calculated columns.

At this point, let’s not forget that all the customizations were entirely done through the SharePoint UI (as opposed to customizations done with SharePoint Designer for example). Which means that you now have the possibility to save your lists as templates and reuse them.

Read the rest of this entry »

Categories

I’m on Twitter!