.Net & SharePoint '07

Technical blog for .Net and all SharePoint 2007 related Information

About the author

Me(Prince) and my wife are B.E in I.T & C.S.E respectively.  I a certified MCPD: Web from 2007 Dec. I am Intrestes in Web Application, MOSS, EPM, etc.
Now working with Deira International School, as IT Application & Help Manager. I have started my career as "Software Developer" @  REACH Sewn Technologies and Consulting Pvt. Ltd, Bangalore India from Oct 2004 to Feb 2006, then as "Web & Intranet Developer" @ Fosroc International Ltd, Dubai from April 2006 to Sep 2009.
You can catch me on mail@jpy-tech.com or mail@princepy.com. Or on 00971 - 50 - 4284530 

Google Translate

Tag cloud

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

RecentComments

Comment RSS

Google Your Location


Color Coding - Formula Generator

 

Published an article about color coding for SharePoint lists three months ago, and its sibling for calendar views last month. Both rely on the same client side method, the “HTML calculated column“.

Color coding involves 3 steps:

1/ Select the color

2/ Apply the formatting: traffic light, font color, background color, etc.

3/ Include the magic script that renders the formatting (SharePoint OOTB would just display text)

People are usually comfortable with step 3, which is just a copy/paste of a generic script. But some users are struggling with the first two steps, because they are not so familiar with SharePoint calculated columns.

So I have decided to publish a list of examples based on the default SharePoint lists. They can be used as is and should cover a wide range of use cases. For each example, you can grab the formula by clicking on “copy to clipboard”.

If you are a seasoned list designer, skip this post…but forward the link to your friends!

1/ Color selection

In HTML, you can identify a color by its name or its code. Here we’ll stick to the friendly color names. A good reference is W3schools.

Let’s call [Color] the column that will store the value. You can choose among the following column types:
- Text
- Choice
- Calculated column

The latter will be the most useful, as the color usually depends on another factor. For example, we’ll pick red for issues that are tagged as “Critical”.

If you are not familiar with calculated columns, you can start by reading this introduction.

--------------------------------------------

Formula Generator. Fill out the form with your choice list and the associated colors, select one pattern (Background/Font color/Traffic light), and the Formula Generator will build the formula for you. Hopefully this will allow more users to benefit from the HTML Calculated Column.

I plan to build other formula generators in the future to accomodate other needs (progress bars, etc.). Spread the word!


Tags: ,
Categories: JQuery | MOSS
Posted by admin on Tuesday, April 21, 2009 1:16 PM
Permalink | Comments (0) | Post RSSRSS comment feed