Comments on: Use jQuery to Create KPIs out of Calculated Columns http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/ No GeekSpeak on SharePoint 2007 WSS and MOSS Wed, 21 Jul 2010 15:30:49 -0400 http://wordpress.org/?v=2.8.6 hourly 1 By: Rene http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-85337 Rene Tue, 20 Jul 2010 07:51:30 +0000 http://www.endusersharepoint.com/?p=8931#comment-85337 Kerri, in this case the class ms-stylebody is used, and not ms-vb. As I have both web parts (the "normal view" and the "boxed view") on my page, I do a selection and replacement for both cases at once (you could just replace all ms-vb 's in above example with ms-stylebody). Also, I just saw that a space is added to the value of my output, so I modified $(this).html(SetColour($(this).html())); to a trimmed version with spaces at the beginning and end of it: $('TD.ms-stylebody:contains("KPI_Green"),TD .ms-stylebody:contains("KPI_Yellow"),TD .ms-stylebody:contains("KPI_Red"), TD.ms-vb2:contains("KPI_Green"),TD .ms-vb2:contains("KPI_Yellow"),TD .ms-vb2:contains("KPI_Red")').each(function() { $(this).hide(); $(this).html(SetColour($.trim($(this).html()))); $(this).show(); }); }); Kerri, in this case the class ms-stylebody is used, and not ms-vb. As I have both web parts (the “normal view” and the “boxed view”) on my page, I do a selection and replacement for both cases at once (you could just replace all ms-vb ’s in above example with ms-stylebody).

Also, I just saw that a space is added to the value of my output, so I modified
$(this).html(SetColour($(this).html()));
to a trimmed version with spaces at the beginning and end of it:

$(’TD.ms-stylebody:contains(”KPI_Green”),TD .ms-stylebody:contains(”KPI_Yellow”),TD .ms-stylebody:contains(”KPI_Red”), TD.ms-vb2:contains(”KPI_Green”),TD .ms-vb2:contains(”KPI_Yellow”),TD .ms-vb2:contains(”KPI_Red”)’).each(function()
{
$(this).hide();
$(this).html(SetColour($.trim($(this).html())));
$(this).show();
});
});

]]>
By: Kerri http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-85319 Kerri Tue, 20 Jul 2010 06:33:31 +0000 http://www.endusersharepoint.com/?p=8931#comment-85319 Jason, Thanks! I played with this a little and got it working with my own images based on a choice column, no calculated column needed, but I won't work in boxed views. Anyone have a work around for boxed views? Also, will this solution work in SP2010? Thanks again! Jason, Thanks! I played with this a little and got it working with my own images based on a choice column, no calculated column needed, but I won’t work in boxed views. Anyone have a work around for boxed views? Also, will this solution work in SP2010? Thanks again!

]]>
By: Arkadiy http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-85226 Arkadiy Tue, 20 Jul 2010 03:38:48 +0000 http://www.endusersharepoint.com/?p=8931#comment-85226 unfortunately I work for a large bank and only have OOB, fully protected SharePoint instance on the farm without even SharePoint Designer available. unfortunately I work for a large bank and only have OOB, fully protected SharePoint instance on the farm without even SharePoint Designer available.

]]>
By: David Sykes http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-85144 David Sykes Mon, 19 Jul 2010 23:01:37 +0000 http://www.endusersharepoint.com/?p=8931#comment-85144 Not really a solution for end users, but you could attach an event handler to the list (fieldUpdating, fieldUpdated) to protect the field. I use this solution to send me an email if the formula is changed on some of my calculated columns. You could also set it to not allow the change, its really up to you. David Not really a solution for end users, but you could attach an event handler to the list (fieldUpdating, fieldUpdated) to protect the field. I use this solution to send me an email if the formula is changed on some of my calculated columns. You could also set it to not allow the change, its really up to you.

David

]]>
By: EndUserSharePoint http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-84894 EndUserSharePoint Mon, 19 Jul 2010 11:24:34 +0000 http://www.endusersharepoint.com/?p=8931#comment-84894 Peter Allen, from BitsOfSharePoint.com, has aggregated the Out-of-the-Box (OOB) images into a single location for easy access: http://www.bitsofsharepoint.com/BlogPoint/Lists/Posts/Post.aspx?List=96f31f8e%2Dca05%2D4cbe%2D9ad7%2D628b4cad2a36&ID=37 Mark Peter Allen, from BitsOfSharePoint.com, has aggregated the Out-of-the-Box (OOB) images into a single location for easy access:

http://www.bitsofsharepoint.com/BlogPoint/Lists/Posts/Post.aspx?List=96f31f8e%2Dca05%2D4cbe%2D9ad7%2D628b4cad2a36&ID=37

Mark

]]>
By: Rene http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-84854 Rene Mon, 19 Jul 2010 09:19:58 +0000 http://www.endusersharepoint.com/?p=8931#comment-84854 Hi Tim, if you had access to the actual server, you could browse through the images at the following location: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES As you probably have not, I think it will not be possible for you to get a listing of these images. To answer your question: the smaller versions are named "kpidefault-0.gif" etc. Hi Tim,

if you had access to the actual server, you could browse through the images at the following location:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES

As you probably have not, I think it will not be possible for you to get a listing of these images.
To answer your question: the smaller versions are named “kpidefault-0.gif” etc.

]]>
By: Tim Cleveland http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-84097 Tim Cleveland Sat, 17 Jul 2010 17:50:49 +0000 http://www.endusersharepoint.com/?p=8931#comment-84097 Since I'm an end user, is there a way to find/identify the names of the KPI graphics if I want to use a smaller image size? Thanks for this tip...it works great!! Just looking for smaller images. Since I’m an end user, is there a way to find/identify the names of the KPI graphics if I want to use a smaller image size?

Thanks for this tip…it works great!! Just looking for smaller images.

]]>
By: Amit Talekar http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-83641 Amit Talekar Fri, 16 Jul 2010 21:21:29 +0000 http://www.endusersharepoint.com/?p=8931#comment-83641 Probably there is a better way than this but here it is anyways: 1. Enable content management on the list 2. Create another Calculated column which is equal to "main calculated col" 3. Make the "main calculated column" hidden Probably there is a better way than this but here it is anyways:

1. Enable content management on the list
2. Create another Calculated column which is equal to “main calculated col”
3. Make the “main calculated column” hidden

]]>
By: Arkadiy B http://www.endusersharepoint.com/2010/07/16/using-jquery-to-create-kpis-out-of-calculated-columns/comment-page-1/#comment-83614 Arkadiy B Fri, 16 Jul 2010 19:51:44 +0000 http://www.endusersharepoint.com/?p=8931#comment-83614 i love the calculated columns in SharePoint, however, my users (with edit permissions to the list) keep accidentally overwriting the formulas. Is there a solution to protect the calculated field from such annoying changes? i love the calculated columns in SharePoint, however, my users (with edit permissions to the list) keep accidentally overwriting the formulas. Is there a solution to protect the calculated field from such annoying changes?

]]>