dave@crackerbox
happy to share my ideas.....

Displaying KPI icons in a WSS list with a custom field type

Saturday, 8 November 2008 15:08 by dave

When I was first asked to replicate KPI Indicator functionality in WSS I thought it can't be too hard.  I'd figured I'd be able to get a calculated field to output an IMG tag with a reference to a Site Collections image folder.  NOT.

After hours of workflow hell and finding out that lists with SPD workflows don't like being templated and copied I came across a new field type created by Stefan Costan called IconSet.

IconSet simply offers a formula box where the result gets evaluated against three criteria to display one of three graphics.  Stefan has included about 5 icon sets to start with.  IconSet uses a third party formula engine which offers a pretty good coverage of Excel formulas which is basically the same set used in SharePoint.

Basically an excellent tool.

Installation was reasonably error free.  I had some issues moving the dll's in to the GAC as I don't have VS installed on the production box.  A little googling and an installation of the .NET v2 SDK and all was fine.  I also took the liberty of overwriting a copy of Stefan's included icons with some images users preferred.  One of the images was a blank image which basically represents a no value result or when no icon is wanted.  This extends Stefan's solution a little.

Although the formula engine appears to be full featured is was unaware of SharePoint's [Today] or [Me] keywords.  These won't work natively in a calculated field anyway so not much of a loss.  The problem is the normal workaround of creating a fake Today field of any field type still did not allow the [Today] keyword to be used like you can in a calculated field.  This meant creating intermediary calculated columns to handle some formulas with SharePoint specific formulas.

** UPDATE **
I've had a chance to look around a little and found a much better way of achieving this and will blog here soon.

Comments (1) -

November 8. 2008 20:07

Nice post. Thank you.

BTW if you want [today] function taken into consideration please tell me. It works in this very last release. I know the way how the formula's have to be writen is not documented but... I can help.

So if you want to use the Today function do it as bellow:

=TODAY()

That is it.

Cheers,

Stefan

Stefan Costan

Add comment




biuquote
  • Comment
  • Preview
Loading