<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pentalogic Technology &#187; Calculated Columns</title>
	<atom:link href="http://blog.pentalogic.net/category/calculated-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pentalogic.net</link>
	<description>Company blog and SharePoint Tricks and Tips</description>
	<lastBuildDate>Fri, 03 Feb 2012 16:49:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Free HTML Calculated Column for SharePoint</title>
		<link>http://blog.pentalogic.net/2012/01/free-html-calculated-column-for-sharepoint/</link>
		<comments>http://blog.pentalogic.net/2012/01/free-html-calculated-column-for-sharepoint/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 16:03:44 +0000</pubDate>
		<dc:creator>Stuart Pegg</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Highlighter]]></category>
		<category><![CDATA[SharePoint HTML Calculated Column]]></category>
		<category><![CDATA[10 Percent Time]]></category>
		<category><![CDATA[HTML Calculated Column]]></category>
		<category><![CDATA[SharePoint Highlighter]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2623</guid>
		<description><![CDATA[A free calculated column for SharePoint 2007 and 2010 that actually displays HTML.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2012%2F01%2Ffree-html-calculated-column-for-sharepoint%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2012%2F01%2Ffree-html-calculated-column-for-sharepoint%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2012/01/logo-wordy.jpg"><img style="background-image: none; border-right-width: 0px; margin: 0px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="logo-wordy" border="0" alt="logo-wordy" src="http://blog.pentalogic.net/wp-content/uploads/2012/01/logo-wordy_thumb.jpg" width="436" height="149" /></a></p>
<p>A free calculated column for SharePoint 2007 and 2010 that allows you to display HTML: <a href="http://www.pentalogic.net/sharepoint-products/free-stuff/html-calculated-column" target="_blank">SharePoint HTML Calculated Column</a></p>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2012/01/html-formula2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="html-formula2" border="0" alt="html-formula2" src="http://blog.pentalogic.net/wp-content/uploads/2012/01/html-formula2_thumb.png" width="500" height="184" /></a></p>
<h3>Why did you make this?</h3>
<p>I spent a long time working on <a href="http://www.pentalogic.net/sharepoint-products/highlighter">SharePoint Highlighter</a>, and then later <a href="http://blog.pentalogic.net/2011/08/how-not-to-develop-a-sharepointtoday-calculated-column/">unsuccessfully trying to make a [Today] Calculated Column</a>. During both these projects we kept coming back to this glaring hole in SharePoint: You can’t use HTML in a calculated column.</p>
<p>After unsuccessfully looking for open source projects (or even commercial alternatives) for some time, the only solution I could find was <a href="http://blog.pathtosharepoint.com/2009/11/19/html-calculated-column-minor-update-and-some-advice/" target="_blank">Christophe’s JavaScript workaround</a> using a normal calculated column and a Content Editor Web Part. A nice solution, but unfortunately not without its drawbacks.</p>
<p>So when it came to deciding what I wanted to do in my <a href="http://blogs.pressgazette.co.uk/fleetstreet/2008/01/08/how-the-bbcs-10-per-cent-time-works/" target="_blank">10% time</a>, the answer was clear.</p>
<p>Having listened to me rant, rave, swear, and finally give up and denounce all Custom Field Type development (at least once a week during Highlighter, and several times during the <a href="http://blog.pentalogic.net/2011/08/how-not-to-develop-a-sharepointtoday-calculated-column/" target="_blank">[Today] incident</a>), Ryan’s reaction to my choice of project was a typically understated “I’m… surprised?”.</p>
<p>So during the TeamTime project I spent my Friday afternoons creating the first of hopefully many pet projects from us at Pentalogic: <a href="http://www.pentalogic.net/sharepoint-products/free-stuff/html-calculated-column" target="_blank">SharePoint HTML Calculated Column</a></p>
<h3><a href="http://blog.pentalogic.net/wp-content/uploads/2012/01/htmlccss.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="htmlccss" border="0" alt="htmlccss" src="http://blog.pentalogic.net/wp-content/uploads/2012/01/htmlccss_thumb.png" width="584" height="292" /></a></h3>
<h3>How is this different to Christophe’s solution?</h3>
<p>Using the SharePoint HTML Calculated Column avoids the need to add Content Editor Web Parts (containing JavaScript) to every page you want the HTML to be displayed on.</p>
<p>Adding the CEWPs can be a bit of a chore in some cases, and are vulnerable to being accidentally broken by end users editing the pages. They can also be lost on 2007 to 2010 upgrades.</p>
<p>However, HTMLCC requires that a System Administrator install it on the SharePoint server; which in many organisations is a real pain in the ears. Whereas Christophe’s solution can be implemented by most power users.</p>
<h3>Isn’t this the same as Highlighter?</h3>
<p><a href="http://www.pentalogic.net/sharepoint-products/highlighter" target="_blank">SharePoint Highlighter</a> offers quite a lot more than this solution on it’s own. I won’t go into enormous detail, but here’s a sample of what Highlighter offers over the HTML Calculated Column:</p>
<ul>
<li>Row highlighting </li>
<li>Countdowns </li>
<li>Conditional formatting </li>
<li>Built-in icon library </li>
</ul>
<p>Most notably, all of this is offered through a polished and intuitive interface.</p>
<h3>Finally</h3>
<p>So, you get to plug the hole in SharePoint that’s bothered so many people over so much time, and we get to plug <a href="http://www.pentalogic.net/sharepoint-products/highlighter">SharePoint Highlighter</a> whenever we mention it. Everybody’s happy. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://blog.pentalogic.net/wp-content/uploads/2011/11/wlEmoticon-smile.png" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2012/01/free-html-calculated-column-for-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Date Range filtering with the new version of FilterPoint, PivotPoint and Planner.</title>
		<link>http://blog.pentalogic.net/2011/12/date-range-filtering-with-the-new-version-of-filterpoint-pivotpoint-and-planner/</link>
		<comments>http://blog.pentalogic.net/2011/12/date-range-filtering-with-the-new-version-of-filterpoint-pivotpoint-and-planner/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 08:18:21 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[FilterPoint Web Part]]></category>
		<category><![CDATA[PivotPoint Web Part]]></category>
		<category><![CDATA[SharePoint Planner]]></category>
		<category><![CDATA[SharePoint webparts]]></category>
		<category><![CDATA[PivotPoint]]></category>
		<category><![CDATA[Planner]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2645</guid>
		<description><![CDATA[FilterPoint has had the ability to send Date Filters but a common request has been Date Ranges – like showing everything this month, last year or between two arbitrary dates. The good news is that we&#8217;ve added this in to FilterPoint as of version 1.2 The bad news is that this will only work with our other SharePoint products [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F12%2Fdate-range-filtering-with-the-new-version-of-filterpoint-pivotpoint-and-planner%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F12%2Fdate-range-filtering-with-the-new-version-of-filterpoint-pivotpoint-and-planner%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>FilterPoint has had the ability to send <a href="http://www.pentalogic.net/sharepoint-products/filterpoint/fp-manual/fp-configuration/filter-style/date-picker">Date Filters</a> but a common request has been <strong>Date Ranges</strong> – like showing everything this month, last year or between two arbitrary dates.</p>
<p><img class="aligncenter" src="http://static.pentalogic.net/filterpoint/date-range.png" alt="FilterPoint - Date Range Filtering" width="357" height="186" /></p>
<p>The good news is that we&#8217;ve added this in to FilterPoint as of version 1.2</p>
<p>The bad news is that this will only work with our other SharePoint products – <a href="http://www.pentalogic.net/sharepoint-products/planner">Planner</a> and <a href="http://www.pentalogic.net/sharepoint-products/pivotpoint">PivotPoint</a> – it won’t work with SharePoints built in List View web part (LVWP).</p>
<h3>That’s disappointing!</h3>
<p>Yes it is &#8211; it’s just a limitation of SharePoints filtering I am afraid, but all is not lost!</p>
<p>This page shows how you can do things like <strong><a href="http://www.pentalogic.net/sharepoint-products/filterpoint/fp-manual/fp-configuration/date-range-filtering">Month filtering using calculated columns</a></strong> and this blog article shows how you can setup <a href="http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/">“Current Month/Previous Month” views using nothing more than Calculated Columns and View filters.</a></p>
<h3>Upgrading</h3>
<p>As always you can upgrade without losing any settings by downloading and running the latest trial version and selecting “Upgrade” when prompted (don’t forget you need the a recent version of <a href="http://www.pentalogic.net/sharepoint-products/planner">Planner</a> (v2.6.9+) and <a href="http://www.pentalogic.net/sharepoint-products/pivotpoint">PivotPoint</a> (2.2.0+) to accept date range filters.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2011/12/date-range-filtering-with-the-new-version-of-filterpoint-pivotpoint-and-planner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Create a SharePoint &#8220;Does Not Begin With&#8221; Filtered List View</title>
		<link>http://blog.pentalogic.net/2011/09/how-to-create-a-sharepoint-does-not-begin-with-filtered-list-view/</link>
		<comments>http://blog.pentalogic.net/2011/09/how-to-create-a-sharepoint-does-not-begin-with-filtered-list-view/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 13:56:38 +0000</pubDate>
		<dc:creator>Clare</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Filter]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2531</guid>
		<description><![CDATA[How to use SharePoint Calculated columns to create SharePoint list views for "Does not contain", "Does not begin with" or "Does Not end with".]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F09%2Fhow-to-create-a-sharepoint-does-not-begin-with-filtered-list-view%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F09%2Fhow-to-create-a-sharepoint-does-not-begin-with-filtered-list-view%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Wonderful though SharePoint is most of the time, occasionally it just lets you down at the most unexpected moment.</p>
<p>So, last week, I wanted to look at a list of all of our sales that were not made to organizations in the USA.</p>
<p>Simple I thought, since all our sale reference numbers start with a 3 letter country code I shall just create a view for all records where Reference Number does not begin with “USA”</p>
<p>So, create a new view, off we go:</p>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/09/does-not-begin-with.png"><img class="size-full wp-image-2532 aligncenter" title="does not begin with" src="http://blog.pentalogic.net/wp-content/uploads/2011/09/does-not-begin-with.png" alt="" width="365" height="344" /></a></p>
<p>Oh dear, we have an option for “begins with” and &#8220;contains” but nothing for “does not begin with” or “does not contain”.  How disappointing!</p>
<p>So, quick call to Ryan, the king of the calculated column, and we have a handy workaround which seemed worth sharing with you.</p>
<p>Create a calculated column using the following formula which will just display the first 3 letters of the reference code – call it something like “First 3 letters”.</p>
<pre>=LEFT([Reference Number],3)</pre>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/09/calc-column.png"><img class="aligncenter size-full wp-image-2536" title="calc column" src="http://blog.pentalogic.net/wp-content/uploads/2011/09/calc-column.png" alt="" width="311" height="361" /></a></p>
<p>Then create a view with a filter:</p>
<p>WHERE “First 3 Letters” “Is not equal to” “USA”</p>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/09/filtered-view.png"><img class="aligncenter size-full wp-image-2537" title="filtered view" src="http://blog.pentalogic.net/wp-content/uploads/2011/09/filtered-view.png" alt="" width="336" height="228" /></a></p>
<p>Easy as that!</p>
<p>You can use this method to create a view for:</p>
<ul>
<li>Does not begin with</li>
<li>Does not end with (using the RIGHT instead of LEFT function)</li>
</ul>
<p>&#8220;Does not contain&#8221; is a tad more complicated but can be achieved by using the SEARCH function. So in our example</p>
<pre>SEARCH("USA",[Reference #],1)</pre>
<p>Will return the first position of USA in an entry in the Reference Number field, or an error if it can&#8217;t be found.</p>
<p>So combining this calculated column:</p>
<pre>=ISERR(SEARCH("USA",[Reference #],1))</pre>
<p>Which gives &#8220;Yes&#8221; where it returns an error ( &#8220;does not contain&#8221;) and &#8220;No&#8221; where &#8220;USA&#8221; is found, with a filtered view with shows only &#8220;Yes&#8221; results, will give you records which<em><strong> do not contain</strong></em> USA.</p>
<p>See our <a title="SharePoint Calculated Column Cheat Sheet" href="http://blog.pentalogic.net/2011/05/sharepoint-calculated-column-cheat-sheet/">Calculated Column Cheat Sheet</a> for these and other useful formulas.</p>
<p>Hope this helps, and if you have any suggestions for other calculated column ninja moves we would love to hear them.</p>
<table border="0">
<tbody>
<tr>
<td><img title="cheat sheet screen shot" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png" alt="" width="149" height="220" /></td>
<td><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/calculated-column-cheat-sheet/" width="440"></iframe></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2011/09/how-to-create-a-sharepoint-does-not-begin-with-filtered-list-view/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How not to develop a SharePoint [Today] Calculated column</title>
		<link>http://blog.pentalogic.net/2011/08/how-not-to-develop-a-sharepointtoday-calculated-column/</link>
		<comments>http://blog.pentalogic.net/2011/08/how-not-to-develop-a-sharepointtoday-calculated-column/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 10:28:56 +0000</pubDate>
		<dc:creator>Stuart Pegg</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Highlighter]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[SharePoint Development]]></category>
		<category><![CDATA[Today]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2416</guid>
		<description><![CDATA[4 ways you can't develop a SharePoint [Today] friendly calculated column; from the abrupt to the dangerous.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F08%2Fhow-not-to-develop-a-sharepointtoday-calculated-column%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F08%2Fhow-not-to-develop-a-sharepointtoday-calculated-column%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/08/path-less-travelled-2.jpg"><img class="alignleft size-full wp-image-2422" title="path less travelled 2" src="http://blog.pentalogic.net/wp-content/uploads/2011/08/path-less-travelled-2.jpg" alt="" width="238" height="286" /></a>After developing <a href="http://www.pentalogic.net/sharepoint-products/highlighter" target="_blank">SharePoint Highlighter</a>, we seriously considered expanding on this area with a Calculated Column that would allow you to use [Today] in the formula. If you’re thinking “But you can already!” I suggest looking at Ryan’s article about the <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/" target="_blank">[Today] column trick</a>.</p>
<p>Needless to say, this would be a very useful tool for almost any SharePoint user. After much researching and prototyping we came to an unfortunate conclusion: Although it was <em>possible</em> to make a Custom Field Type to do this, it was almost certainly impractical (certainly for us).</p>
<p>The avenues we investigated finished in three types of dead-end:</p>
<ul>
<li>Brick wall: A completely impassable system limitation.</li>
<li>Overgrown with brambles: Nothing but pain for all involved.</li>
<li>Swamps: A long unpleasant slog, with an uncertain outcome.</li>
</ul>
<h3>The Brick Wall</h3>
<p>The first thought in any developer’s mind when making a variation on a class should be “Inherit it”. It allows you to take advantage of the existing class’ methods with minimal difficulty and yet offers (almost) total control over its behaviour.</p>
<p>Attempting to do so will reward you with the slightly misleading error:</p>
<blockquote><p>The type &#8216;Microsoft.SharePoint.SPFieldCalculated&#8217; has no constructors defined</p></blockquote>
<p>A brief search in the MSDN documentation for <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldcalculated.aspx" target="_blank">SPFieldCalculated</a> shows that the absence of public constructors is intentional:</p>
<blockquote><p>Windows SharePoint Services 3.0 does not support inheriting from this class.</p></blockquote>
<p>And so this avenue ended in a brick wall. More worryingly; disallowing the inheritance of a class is usually a sign that something so heinous is happening inside that Microsoft doesn’t want it reproduced.</p>
<h3>Brambles</h3>
<p>Intrigued by the promise of horrifying creatures dwelling within, I had a look inside the class to see what was happening (using my own powers of code intuition, and not any kind of questionable reverse engineering method).</p>
<p>It seems the actual calculations take place outside of the SPFieldCalculated class, using instead a call to SPRequest. This new lane of research quickly ended in spiky brambles, as using a direct call to SPRequest would make our product (and hence anything it’s installed on) unsupported by Microsoft.</p>
<p>Undeterred, I took inspiration from the billing system at my old work and looked at keeping the ‘black box of calculation mystery’ class running in the background, with the new class acting as a wrapper around it.</p>
<p>Creating a Custom Field Type that kept a hidden field for data storage in the background was an architecture we’d experimented with when creating Highlighter, so adding a relatively minor call to update the formula with the current date and time seemed quite easy.</p>
<p>The thorny ending in this case was the enormous potential server load; updating the formula every time the list was viewed (to keep it up to date) caused the entire list’s worth of calculations to be refreshed. Viewing just 20 items would make up to 5000 items recalculate their values for each of our columns on the view.</p>
<h3>Swamps</h3>
<p>The final and most desperate option was to do it ourselves: Completely rewrite all or a subset of the calculated column functions, and handle the associated function nesting.</p>
<blockquote><p>I’m DIM: Doin’ It M’self.</p></blockquote>
<p>Following this path would mean wading through the boggy and unpleasant process of <em>exactly</em> reproducing Microsoft’s function calls; avoiding the murky bottomless pools of performance issues. All the while hoping we wouldn’t run into any of the hungry and sharp-toothed show stoppers along the way.</p>
<p>As you may have guessed, we didn’t venture down this path.</p>
<h3>Why are you telling me all this?</h3>
<p>Because although these paths aren’t available to us as an ISV, it doesn’t mean they aren’t options to you (except the brick wall, of course).</p>
<p>Brambles: Using SPRequest is unsupported, but if this doesn’t deter you then this is still very much an option. Similarly, if you have an abundance of processing power (or really need a space heater in your server room) performing complete column recalculations on every view shouldn’t bother you.</p>
<p>Swamps: If you have <em>very</em> specific requirements you could get away with only recoding a few functions, which would greatly reduce the chances of you disappearing forever. Alternatively, if you have a large herd of idle developers you could set about recreating the whole set. However, I doubt this is a serious option for anyone except the head of the Microsoft Silverlight team.</p>
<table border="0">
<tbody>
<tr>
<td><img title="cheat sheet screen shot" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png" alt="" width="149" height="220" /></td>
<td><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/calculated-column-cheat-sheet/" width="440"></iframe></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2011/08/how-not-to-develop-a-sharepointtoday-calculated-column/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SharePoint Calculated Column Cheat Sheet</title>
		<link>http://blog.pentalogic.net/2011/05/sharepoint-calculated-column-cheat-sheet/</link>
		<comments>http://blog.pentalogic.net/2011/05/sharepoint-calculated-column-cheat-sheet/#comments</comments>
		<pubDate>Thu, 19 May 2011 12:00:45 +0000</pubDate>
		<dc:creator>Clare</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[SharePoint Ideas]]></category>
		<category><![CDATA[SharePoint 2010]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2171</guid>
		<description><![CDATA[SharePoint Calculated Column Cheat Sheet, easy 3 page Reference for the functions, formulas and operators used most commonly in SharePoint Calculated Columns.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F05%2Fsharepoint-calculated-column-cheat-sheet%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F05%2Fsharepoint-calculated-column-cheat-sheet%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png"></a>Calculated columns are a really useful feature of any SharePoint list.</p>
<p>Whether you want to automatically show the profit on a sale, or the financial year that a date falls in to, or tidy up sloppy user input by capitalising names.  There is a lot you can do it with a Calculated Column.</p>
<p>But remembering the formulas and functions needed is not always easy, especially before the first coffee of the morning.  I know there is a way to get rid of the decimal places on a number but is it TRUN, or TRUNC, or TRUNK &#8211; oh no, hang on, that last one is just to do with elephants!</p>
<p>So, over the years we&#8217;ve gathered together a quick reference of some of the most commonly used functions and formulas &#8211; stuck on a wall above the desk it saves a lot of time and head scratching.  We&#8217;ve found ourselves sending it to clients from time to time, and they seem to find it quite handy too.</p>
<p>So we decided to tidy it up &#8211; clean off the coffee stains and make a nice PDF of it &#8211; and make it available to download, free &#8211; yes that&#8217;s right, FREE!</p>
<table border="0">
<tbody>
<tr>
<td><img title="cheat sheet screen shot" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png" alt="" width="149" height="220" /></td>
<td>
<p><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/calculated-column-cheat-sheet/" width="440"></iframe></p>
</td>
</tr>
</tbody>
</table>
<p>So why not download our free Calculated Column Cheat Sheet and save yourself some time and headaches?  This easy 3 page reference sheet gives you a selection of commonly used calculated column formulas, along with a pretty thorough reference of most of the functions and operators you are likely to need in your day to day work.</p>
<p>Download, print, stick it on the wall, and we hope you find it as handy as we do!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2011/05/sharepoint-calculated-column-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to use [Today] in a SharePoint list</title>
		<link>http://blog.pentalogic.net/2011/05/how-use-today-in-a-sharepoint-list/</link>
		<comments>http://blog.pentalogic.net/2011/05/how-use-today-in-a-sharepoint-list/#comments</comments>
		<pubDate>Thu, 12 May 2011 10:25:00 +0000</pubDate>
		<dc:creator>Stuart Pegg</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Highlighter]]></category>
		<category><![CDATA[SharePoint Development]]></category>
		<category><![CDATA[Training]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[SharePoint Highlighter]]></category>
		<category><![CDATA[Workflows]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=2179</guid>
		<description><![CDATA[Explains why [Today] doesn't work in SharePoint calculated columns, and gives alternatives.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F05%2Fhow-use-today-in-a-sharepoint-list%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2011%2F05%2Fhow-use-today-in-a-sharepoint-list%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://blog.pentalogic.net/wp-content/uploads/2011/05/today1.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="today" border="0" alt="today" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/today_thumb1.png" width="314" height="124" /></a></p>
<p>Quite frequently we see <a href="http://sharepoint.stackexchange.com/questions/12341/in-a-task-list-how-can-i-display-a-message-when-within-x-days-of-due-date" target="_blank">questions</a> about using the current date to display messages on a list when a date or time is (or will soon be) overdue. Most of these queries are from frustrated users who are trying to use [Today] in a calculated column, but find it missing.</p>
<p>I’ll quickly outline why this option is missing from calculated columns, and hence why the <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/" target="_blank">notorious [Today] trick</a> is quite so controversial. But most importantly, I’ll run you through ways to actually display the information you want.</p>
<h3 style="vertical-align: bottom">Why is [Today] missing from calculated columns?</h3>
<p style="vertical-align: bottom">When we look at a SharePoint list, the vast majority of us are instantly reminded of Excel (or <a href="http://blog.pentalogic.net/2011/02/sharepoint-and-access-power-to-the-people/" target="_blank">Grandfather Excel</a>, if you prefer). Because of this we quite reasonably expect it to act like Excel, and hence expect it to reconsider every formula and data item on the page each time we view it.</p>
<p style="vertical-align: bottom">Unfortunately because of the much larger amount of information SharePoint has to pass back and forth, it takes a different approach to updating the data items. It will only update calculated values when the related item is added or edited.</p>
<p style="vertical-align: bottom">Consider SharePoint as an overworked secretary; if you ask for a file to be updated they’ll find it in the filing cabinet, update the information, and correct anything else that’s awry on the paperwork while they’re there. If you ask for all the files for people named “Smith” to be put on your desk, unless you specifically say “And update the information on every single one while you’re at it”, it’s not likely they’ll do the extra work for no reason.</p>
<p style="vertical-align: bottom">Because of this change in records-keeping, Microsoft had to skip functionality that would make this lower-maintenance updating method obvious. Since having a [Today] option would cause unedited items to go out of date every day, they had to leave it out. The [Me] option was another casualty, as it would require checking the current user every time the data was displayed.</p>
<p style="vertical-align: bottom">So how do we get our files updated without further flustering our imaginary secretary? There are several options:</p>
<ul>
<li><em>JavaScript</em>: Use a Content Editor Web Part. Also known as “Do it yourself.”. </li>
<li><em>Designer</em>: Create a custom view in SharePoint Designer. “Ask the secretary really nicely”. </li>
<li><em>Code</em>: Make your own custom field type from scratch. “Get your own team to do it”. </li>
<li><em><a href="http://www.pentalogic.net/sharepoint-products/highlighter" target="_blank">SharePoint Highlighter</a></em>: Our own solution to the problem. “Hire an extra secretary”. </li>
</ul>
<h3 style="vertical-align: bottom">JavaScript <img style="background-image: none; border-right-width: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="document_into8" border="0" alt="document_into8" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/document_into81.png" width="16" height="16" /></h3>
<p>Of course there’s always a JavaScript solution, and <a href="http://www.endusersharepoint.com/2009/01/23/jquery-for-everyone-replacing-today/" target="_blank">this one in particular</a> from Paul Grenier uses jQuery to help with the process. This will mean adding the jQuery libraries to your site, and it’s also necessary to add a Content Editor Web Part to each page you want the feature to work on.</p>
<p>A little JavaScript knowledge will probably be necessary to make it fit your requirements, and as with any code tweaking, the more you know the better the result will be.</p>
<h3 style="vertical-align: bottom">Designer <img style="background-image: none; border-right-width: 0px; margin: 0px 0px 5px 5px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="designer30" border="0" alt="designer30" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/designer302.png" width="16" height="16" /></h3>
<p>SharePoint Designer is a <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d88a1505-849b-4587-b854-a7054ee28d66" target="_blank">free</a> and powerful (and hence often banned) tool from Microsoft for modifying your SharePoint site. Using Designer it’s possible to alter a view so that it uses Today when rendering the data on the page. This done by modifying the view’s XSLT (the template the view uses to decide what data goes where).</p>
<p>If you’d like a dabble to test the water of such changes, MSDN has a <a href="http://msdn.microsoft.com/en-us/library/ff630941.aspx" target="_blank">nice tutorial</a> on how to get started.</p>
<p>However, if you already have some experience with Designer (or you’d like to just jump straight in), Greg Osimowicz has an article on using Today in XSLT to <a href="http://sharepointapplied.com/2009/04/23/useless-calculated-column-today-trick-xsl-today-to-the-rescue/" target="_blank">calculate holidays accrued to date</a> (scroll down to “Below are the steps I followed:”).</p>
<h3 style="vertical-align: bottom">Code <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="studio6" border="0" alt="studio6" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/studio61.png" width="16" height="16" /></h3>
<p>There are a number of possible different methods to solving this problem using a <a href="http://msdn.microsoft.com/en-us/library/bb861799.aspx" target="_blank">custom field type</a>. As always this comes with my standard disclaimer that developing a custom field type from scratch for a single purpose requires a disproportionate investment of time for the results.</p>
<p>In 2010 it’s possible to do the calculations in the custom field type class (with some light persuasion), however this is not possible with 2007 as it does not use the class to render its information on list views.</p>
<p>Unfortunately not even <a href="http://msdn.microsoft.com/en-us/library/aa544291.aspx" target="_blank">CAML</a> can save us in this instance, as the View Schema doesn’t provide the current date in a usable form. But if you’re using 2010 you may be able to create a workaround with <a href="http://msdn.microsoft.com/en-us/library/ff606773.aspx" target="_blank">XSLT</a> and Greg’s Designer XSLT solution in the section above.</p>
<p>The last option is to use the field type to get JavaScript onto the page instead of using a CEWP. This has the benefit that you don’t need to put the CEWP on each page, but as I mentioned in my previous article it can be very troublesome to do so: <a href="http://blog.pentalogic.net/2011/05/how-to-do-list-highlighting-in-sharepoint/" target="_blank">How to do list highlighting in SharePoint</a></p>
<h3 style="vertical-align: bottom">SharePoint Highlighter <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="currency_dollar4" border="0" alt="currency_dollar4" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/currency_dollar41.png" width="16" height="16" /></h3>
<p>Normally this is the section where I’d talk about the benefits of a commercial solution, and try to avoid mentioning <a href="http://www.pentalogic.net/sharepoint-products/highlighter" target="_blank">SharePoint Highlighter</a> too much (I might even link to our <a href="http://www.pentalogic.net/sharepoint-products/highlighter/product-comparison-3" target="_blank">product comparison</a> page). However, it’s very difficult to talk in general terms about commercial products on the market that have this functionality when yours is the only one that does.</p>
<p>So I’m not going to beat around the bush: If you want to buy a commercial solution to change your list view display based on today’s date, then <a href="http://www.pentalogic.net/sharepoint-products/highlighter" target="_blank">SharePoint Highlighter</a> is the only (and hence best) solution. It does much more than just this, but I’m not going to blow my trumpet too much.</p>
<p> If you want to see a real life problem and its solution using SharePoint Highlighter; have a look at this <a href="http://sharepoint.stackexchange.com/questions/10205/check-if-more-than-3-hours/11317#11317" target="_blank">SharePoint Overflow question</a>.      </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2011/05/how-use-today-in-a-sharepoint-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using [Today] in SharePoint calculated default values</title>
		<link>http://blog.pentalogic.net/2010/09/today-sharepoint-calculated-default-values/</link>
		<comments>http://blog.pentalogic.net/2010/09/today-sharepoint-calculated-default-values/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 12:01:35 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[Today]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=1467</guid>
		<description><![CDATA[You can't use Today in SharePoint calculated columns but you CAN use it in calculated default values - here I explain why that is and how you might use it.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2010%2F09%2Ftoday-sharepoint-calculated-default-values%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2010%2F09%2Ftoday-sharepoint-calculated-default-values%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Despite the infamous “fake today column trick” still appearing in new blog posts on a monthly basis you <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/">can’t use Today in calculated columns in SharePoint</a>.</p>
<p><br class="spacer_" /></p>
<p>I’ve seen people <a href="http://suguk.org/forums/24970/ShowThread.aspx" target="_blank">assume</a> (not unreasonably) that the same rule must apply with calculated default values used in columns that are not calculated columns as well &#8211; but strangely,  you actually can use Today in calculated default values, so I am going to explain why it works and how you might use this.</p>
<h3>What is the difference between Calculated Column and Calculated Default value?</h3>
<p>A <a href="http://office.microsoft.com/en-us/windows-sharepoint-services-help/calculate-data-in-lists-or-libraries-HA010105480.aspx" target="_blank">calculated column</a>, erm&#8230; calculates values from other columns in your list.</p>
<p style="text-align: center;"><a href="http://blog.pentalogic.net/wp-content/uploads/2010/09/calculated-column.jpg"><img class="size-full wp-image-1468  aligncenter" title="Calculated Column" src="http://blog.pentalogic.net/wp-content/uploads/2010/09/calculated-column.jpg" alt="SharePoint - add Calculated Column field" width="508" height="284" /></a></p>
<p>For example if you have an orders list with a <strong>Quantity</strong> and <strong>Price</strong> column you can calculate a <strong>Grand Total of Price * Quantity</strong>.</p>
<p>With a calculated default value you use a calculation to set the default value for a column that is not a calculated column &#8211; this is the value that is entered automatically when a new list item is created and may be over-written by the user.</p>
<p style="text-align: center;"><a href="http://blog.pentalogic.net/wp-content/uploads/2010/09/calculated-default-value.jpg"><img class="size-full wp-image-1469  aligncenter" title="Calculated default value" src="http://blog.pentalogic.net/wp-content/uploads/2010/09/calculated-default-value.jpg" alt="SharePoint - setting a calculated default value" width="509" height="213" /></a></p>
<p><strong>So why may I want a calculation using Today as the default value?</strong></p>
<p>Suppose we have a list containing customer complaints and we have a target to resolve everything in 3 days. Sometimes though for complex queries or if there are public holidays we may give more time. In that case we can set the default value as</p>
<pre>= Today + 3</pre>
<p>But the user can override that if necessary (public holiday etc).</p>
<h3>So why can I use Today here but not in calculated columns?</h3>
<p>With a calculated column the calculation is only reworked every time a record is updated. When it&#8217;s just viewed then it picks up the saved result from the last edit. This makes perfect sense for most calculated values, but not for values using <strong>Today </strong>or <strong>Me</strong>.</p>
<p>So for example if we tried to calculate the days left until a due date we might want to use</p>
<pre>Days left = Due Date - Today</pre>
<p>If we added the complaint on Monday then it would show that we have 3 days left to do it (Thursday). If we just look at the record on the Wednesday it would still show 3 days (as this was the calculation saved on Monday) when in fact we only have 1 day left to keep the customer happy.</p>
<p>That&#8217;s why <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/">SharePoint wont let you use Today in calculated columns</a>.</p>
<p>However with a default calculated value the result is only worked out once when the record is being created – it’s understood that what is saved in this field is not updated automatically so there is no problem with using Today.</p>
<p><em>For a bonus point</em> &#8211; you can’t reference other fields in calculations for default values (e.g. Start Date or Order Date) as before a record is being created the fields don’t yet contain values.</p>
<h3>What else could I do with this?</h3>
<p>The OP in this thread is using it to <a href="http://suguk.org/forums/24970/ShowThread.aspx" target="_blank">set default financial years</a>. Suppose that your company’s financial year starts in April then you could use this formula to default to <strong>2009/10</strong> or <strong>2010/11</strong> on or after April.</p>
<pre>=IF(MONTH(Today)&gt;=4,"2010/11","2009/11")</pre>
<p>or generating the year 20xx/xx notation automatically :-</p>
<pre>=IF(MONTH(Today)&gt;=4,YEAR(Today) &amp; "/" &amp; (YEAR(Today)+1),(Year(Today)-1) &amp; "/" &amp; YEAR(Today))</pre>
<p>It’s also worth noting that you can use a similar formula in calculated columns – suppose you have an <strong>Order Date</strong> field and the financial year depends upon when the order was placed then simply replace <strong>Today </strong>with <strong>Order Date</strong>.</p>
<p><em>NB &#8211; This has been tested with SharePoint 2007/2010.</em></p>
<table style="background-color: #64be40; border-color: #39c63b; border-width: 0px; width: 661px; height: 51px;" border="0">
<tbody>
<tr>
<td>
<p><span style="font-size: large;"><span style="color: #ffffff;"><em><strong>Free SharePoint Calculated Column Cheat Sheet</strong></em></span></span></p>
</td>
</tr>
<tr>
<td><span style="font-size: small;"><span style="color: #ffffff;"><em><strong>a handy 3 page reference for calculated column functions and formulas.</strong></em></span></span></td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<td><img title="cheat sheet screen shot" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png" alt="" width="205" height="292" /></td>
<td>
<p><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/calculated-column-cheat-sheet/" width="440"></iframe></p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2010/09/today-sharepoint-calculated-default-values/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How To Use Filters in SharePoint to show items in the current Calendar Month</title>
		<link>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/</link>
		<comments>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 21:55:53 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[SharePoint Ideas]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=373</guid>
		<description><![CDATA[Its very easy using the Filter feature of SharePoint views to show only items completed in the last 30 days or items due in the next X days; for example :- Completed &#62;= [Today]-30 On the Advanced SharePoint View and Filter techniques post Ed asked how you could filter for the current calendar month rather [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F11%2Fhowto-filter-items-current-calendar-month-view-sharepoint%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F11%2Fhowto-filter-items-current-calendar-month-view-sharepoint%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Its very easy using the <a href="http://blog.pentalogic.net/2008/11/the-truth-about-using-today-in-filters/">Filter feature of SharePoint views to show only items completed in the last 30 days</a> or items due in the next X days; for example :-</p>
<pre>Completed &gt;= [Today]-30</pre>
<p>On the <a href="http://blog.pentalogic.net/2008/10/advanced-sharepoint-view-and-filters/">Advanced SharePoint View and Filter techniques</a> post Ed asked how you could filter for the current calendar month rather than a rolling 30 day period (for example all tasks due this calendar month).</p>
<p>Like all great questions it seemed simple enough &#8211; something like only showing items where the Month and Year of the due date = the Month and Year of the current date.</p>
<p><span id="more-373"></span></p>
<p>Alas, we <a href="http://blog.pentalogic.net/2008/11/truth-about-using-today-in-calculated-columns/">can&#8217;t use [Today] in calculated columns</a> and we can&#8217;t use functions like Month([Due Date]) in the filter &#8211; so this approach will not work.</p>
<p>The solution is to turn this on its head &#8211; its a bit weird, so bear with me!</p>
<p>We need to have two calculated fields, one showing the first day of the month that the due date is in and one showing the last day of the month that the due date is in.</p>
<p>We can then use the filter to show only records where</p>
<p>[Today] &gt;= First Day Of Month</p>
<p>AND</p>
<p>[Today] &lt;= Last Day Of Month</p>
<p>So looking at this in graphical form we have :-</p>
<div id="attachment_375" class="wp-caption aligncenter" style="width: 500px"><img class="size-full wp-image-375 " title="Timeline" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/Timeline.png" alt="Timeline" width="490" height="82" /><p class="wp-caption-text">Timeline</p></div>
<ul>
</ul>
<ul>
<li>In this diagram the current date is 15th Nov (the orange dotted line).</li>
<li>Task 1 &amp; 2 should be shown if the current date [Today] is in between the first and the last day of November (the blue line)</li>
<li>Task 3 will not be shown until [Today] is between the first and the last day of December (the blue line)</li>
</ul>
<table border="0" cellpadding="3">
<tbody>
<tr>
<td><img class="aligncenter size-full wp-image-390" title="create-column" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/create-column1.png" alt="create-column" width="209" height="359" /></td>
<td>
<p>To put this into SharePoint open your list, click Settings &gt; List settings &gt; Create Column and setup the following two columns.</p>
<p><br class="spacer_" /></p>
<ul>
<li>The first column will be called something like Start of Month</li>
<li>Set the column type to Calculated and the data type to Date only </li>
<li>Uncheck the &#8216;Add to default view&#8217; button as we want these columns to stay behind the scenes</li>
</ul>
<ul>
<li>The Start of Month column formula should be</li>
</ul>
<pre>    =DATE(YEAR([Due Date]), MONTH([Due Date]), 1)</pre>
<p><br class="spacer_" /></p>
<ul>
<li>The End of Month formula :-</li>
</ul>
<pre>    =DATE(YEAR([Due Date]), MONTH([Due Date])+1,1)-1

    <em>(Which is the first day of next month - 1)</em></pre>
</td>
</tr>
</tbody>
</table>
<p>View a few records to check the formula is working OK and you see the correct dates.</p>
<table border="0" cellpadding="3">
<tbody>
<tr>
<td><img class="aligncenter size-full wp-image-391" title="View-filter" src="http://blog.pentalogic.net/wp-content/uploads/2009/11/View-filter1.png" alt="View-filter" width="223" height="217" /></td>
<td>
<p>Now create a new view, call it something like &#8220;Due This Month&#8221; and setup the filter for</p>
<pre>Start of Month is less than or equal to [Today]
 AND
End of Month is greater than or equal to [Today]</pre>
</td>
</tr>
</tbody>
</table>
<h4><strong>Further tips</strong></h4>
<p>You can use this with date fields other than [Due Date] &#8211; e.g. [Created] for items created in the current month, [Modified] for items well&#8230; urm&#8230; modified in the current month!</p>
<p>Using the same technique you can also use the following formula</p>
<h4><strong>The current week (Sunday to Saturday inclusive)</strong></h4>
<pre> Start Week =[Due Date] - WEEKDAY([Due Date]) +1
 End Week   =[Due Date] +7 - WEEKDAY([Due Date])
</pre>
<h4><strong>The previous month</strong></h4>
<pre> Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])+1, 1)
 End Month   =DATE(YEAR([Due Date]), MONTH([Due Date])+2,1)-1
</pre>
<h4>The next month</h4>
<pre>
<pre> Start Month =DATE(YEAR([Due Date]), MONTH([Due Date])-1, 1)
 End Month   =DATE(YEAR([Due Date]), MONTH([Due Date]),1)-1</pre>
</pre>
<h4><strong>The current year</strong></h4>
<pre> Start Year =DATE(YEAR([Due Date]),1,1)
 End Year   =DATE(YEAR([Due Date]),12,31)
<strong>
</strong></pre>
<h4><strong>Edit</strong></h4>
<p>I should make clear that this technique will not work correctly on Event lists with recurring event as SharePoint only records the start time of the first event, not each occurrence in the series.</p>
<h4><strong>References</strong></h4>
<ul>
<li><a rel="nofollow" href="http://office.microsoft.com/en-us/sharepointtechnology/CH101032601033.aspx" target="_blank">Date and time functions</a></li>
</ul>
<table style="background-color: #64be40; border-color: #39c63b; border-width: 0px; width: 661px; height: 51px;" border="0">
<tbody>
<tr>
<td>
<p><span style="font-size: large;"><span style="color: #ffffff;"><em><strong>Free SharePoint Calculated Column Cheat Sheet</strong></em></span></span></p>
</td>
</tr>
<tr>
<td><span style="font-size: small;"><span style="color: #ffffff;"><em><strong>a handy 3 page reference for calculated column functions and formulas.</strong></em></span></span></td>
</tr>
</tbody>
</table>
<table border="0">
<tbody>
<tr>
<td><img title="cheat sheet screen shot" src="http://blog.pentalogic.net/wp-content/uploads/2011/05/cheat-sheet-screen-shot.png" alt="" width="205" height="292" /></td>
<td>
<p><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/calculated-column-cheat-sheet/" width="440"></iframe></p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2009/11/howto-filter-items-current-calendar-month-view-sharepoint/feed/</wfw:commentRss>
		<slash:comments>106</slash:comments>
		</item>
		<item>
		<title>Tip &#8211; Showing multiple columns in SharePoint Planner Webpart</title>
		<link>http://blog.pentalogic.net/2009/10/tip-multiple-columns-planner-gantt-chart/</link>
		<comments>http://blog.pentalogic.net/2009/10/tip-multiple-columns-planner-gantt-chart/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 13:05:20 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[SharePoint Planner]]></category>
		<category><![CDATA[SharePoint webparts]]></category>
		<category><![CDATA[Formula]]></category>
		<category><![CDATA[gantt]]></category>
		<category><![CDATA[Planner]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Tip]]></category>
		<category><![CDATA[WebPart]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=304</guid>
		<description><![CDATA[This post shows how to show data from more than one list column in one category or timeline in a SharePoint Planner webpart gantt view]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F10%2Ftip-multiple-columns-planner-gantt-chart%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F10%2Ftip-multiple-columns-planner-gantt-chart%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There may be times when you want to display timeline or category information from more than one list column in a gantt chart. For example in the chart below we have taken information from the &#8220;priority&#8221; and &#8220;title&#8221; columns of a list to populate the category labels.</p>
<p>With Planner you can show multiple columns in the <a href="http://www.pentalogic.net/sharepoint-planner-v2/manual.aspx?Page=configuration%2fconfig_plannersource.htm">Category or on the Timeline of a Gantt chart</a> by using a calculated column to merge fields together.</p>
<p><img class="aligncenter size-full wp-image-305" title="concat-columns" src="http://blog.pentalogic.net/wp-content/uploads/2009/10/concat-columns.png" alt="concat-columns" width="600" height="87" /><br />
 For example to merge Priority and Title columns together you would :-</p>
<p><br class="spacer_" /></p>
<ul>
<li>From your list click Settings &gt; Create Column</li>
<li>Set a name such as &#8220;Category&#8221;</li>
<li>Choose Calculated for the type</li>
<li>In formula enter <em>(where [Title] etc is the name of the columns you want to merge)</em></li>
</ul>
<pre>      =[Priority] &amp; " : " &amp; [Title]</pre>
<ul>
<li>Uncheck &#8216;Add to default view&#8217; checkbox if you don&#8217;t want this appearing for the normal list view.</li>
<li>In Planner you can now select this column.</li>
</ul>
<p>You can merge multiple columns together, for example :-</p>
<pre>   =[Priority] &amp; " : " &amp; [Title] &amp; " - " &amp; [Assigned To]</pre>
<p>You can also use <a href="http://office.microsoft.com/en-us/sharepointtechnology/CH100650061033.aspx" target="_blank">SharePoint standard functions and formula</a> (many similar to excel) such as :-</p>
<pre>   =Text([Start Time],"mmm-yyyy") " : " &amp; [Title]</pre>
<p>Which would prefix the Title with Month and year, like so  <em>October-2009 : Your title here</em></p>
<p>To display the the duration in days you could use</p>
<pre>   =DATEDIF([Start Time],[End Time],"d") &amp; " Days"</pre>
<p><a href="http://office.microsoft.com/en-us/sharepointtechnology/HA101054791033.aspx?pid=CH100650061033#2" target="_blank">See some more examples of common functions</a></p>
<p><iframe frameborder="0" height="230" scrolling="auto" src="http://www.pentalogic.net/sharepoint-knowledge-base/download-sharepoint-planner" width="750"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2009/10/tip-multiple-columns-planner-gantt-chart/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SharePoint Reminder Webpart &#8211; Setting a variable Due In or Overdue By time</title>
		<link>http://blog.pentalogic.net/2009/06/setting-variable-due-in-or-overdue-by-time/</link>
		<comments>http://blog.pentalogic.net/2009/06/setting-variable-due-in-or-overdue-by-time/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 16:17:59 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Calculated Columns]]></category>
		<category><![CDATA[SharePoint Reminder]]></category>
		<category><![CDATA[SharePoint webparts]]></category>
		<category><![CDATA[Reminder]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WebPart]]></category>

		<guid isPermaLink="false">http://blog.pentalogic.net/?p=131</guid>
		<description><![CDATA[This post gives 3 different methods for setting a variable "due in" or "overdue by" date in SharePoint Reminder webpart.]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float:right; margin-top:-100px; clear:both;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F06%2Fsetting-variable-due-in-or-overdue-by-time%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.pentalogic.net%2F2009%2F06%2Fsetting-variable-due-in-or-overdue-by-time%2F&amp;source=pentalogic&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When you normally setup SharePoint Reminder webpart you can specify to send an email alert when  a date is <a href="http://www.pentalogic.net/sharepoint-reminder/manual.aspx?Page=webpart%2fconfig_sendwhen.htm" target="_blank"> Due In X days or Overdue by X days</a></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<div id="attachment_132" class="wp-caption aligncenter" style="width: 218px"><a style="align: center;" href="http://blog.pentalogic.net/wp-content/uploads/2009/06/duein.gif"><img class="size-full wp-image-132" title="When column Service Date is due in 5 days" src="http://blog.pentalogic.net/wp-content/uploads/2009/06/duein.gif" alt="" width="208" height="140" /></a><p class="wp-caption-text">When column Service Date is due in 5 days</p></div>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
<p>One fairly common requirement amongst users of Reminder is the ability to set  variable &#8216;Due In&#8217; or &#8216;Overdue By&#8217; times. For example lets imagine the scenario of a company using SharePoint and  Reminder to help control the servicing of various pieces of equipment.</p>
<p><span id="more-131"></span></p>
<p>Some equipment may be quite easy to service and replacements would be readily  available whilst they are &#8216;in the shop&#8217;. Other equipment could be very complex  and much more specialised meaning that we&#8217;ve got to arrange the servicing more  carefully to ensure its available when needed. For the standard type of  equipment perhaps we only need 5 days warning that its due for a service whilst  for the specialized equipment we need at least 30 days notice.</p>
<p>Another example a <a href="http://www.pentalogic.net/sharepoint-reminder/manual.aspx?Page=commonscenarios%2fhelpdesk%2fhelpdesk.htm" target="_blank"> helpdesk system</a> where you are sending out alerts when tickets are still open  after a certain time &#8211; in other words the Created date is overdue (or in the  past) by a certain number of hours or days. For high priority tickets or tickets  from certain people you may want to be alerted if they are still unresolved  after 1 day &#8211; others may be lest time critical and an alert after 2 days is fine.</p>
<p>So how do you do this? Well there are three ways, each with their own strengths :-</p>
<h3>Use an Alert Days column and a calculated column.</h3>
<p>Suppose we have a column Service Date we could add a number column called Alert Days  where we would enter the number of days notice we need for that record.</p>
<p>We then create a calculated column called Alert Date and with the formula</p>
<pre>[Service Date]-[Alert Days]</pre>
<p>Beware though, if you have any records with empty Service Date fields then  SharePoint will calculate this as &#8220;30th December <strong>1899</strong>&#8221; + [Alert  Days] leading to some very overdue records!</p>
<p>To protect against this you should use</p>
<p><span class="style2">=IF( ISBLANK([Service Date]), &#8220;&#8221; , [Service Date]]+[Alert  Days])</span></p>
<p>Which says If the Service Date is blank then the result is too,  otherwise the result is [Service Date]+[AlertDays]. (You could also use a view  to filter out any records with an empty Service Date)</p>
<p>We would end up with a list that looked something like this and we would then  setup a Reminder web part to watch for an overdue Alert Date.</p>
<table id="ft_k" class="zeroBorder" style="width: 100%;" border="0" cellspacing="1" cellpadding="3" bgcolor="#d9ead3" bordercolor="#0b5394">
<tbody>
<tr bgcolor="#6fa8dc">
<td>ID</td>
<td>Service Date</td>
<td>Alert Days</td>
<td>Alert Date</td>
</tr>
<tr>
<td width="5%">1</td>
<td>30th July</td>
<td>5</td>
<td>25th July</td>
</tr>
<tr>
<td width="5%">2</td>
<td>30th July</td>
<td>30</td>
<td>1st July</td>
</tr>
</tbody>
</table>
<p>So event though these two bits of equipment are due to be serviced by the  30th July we will only get an alert about #1 on the 25th (as its a simple bit of  equipment) but #2 is more complex we will get an alert 30 days before the  service is due to give time to organise everything.</p>
<p>This method has the advantage of flexibility, but it relies upon the person  entering data putting in a sensible value in Alert Days.</p>
<p><em>Tip &#8211; This page gives more examples of what you can do with </em> <a href="http://office.microsoft.com/en-us/sharepointtechnology/HA101054791033.aspx" target="_blank"> <em>calculated columns and formula</em></a><em> &#8211; for example adding a number of  months to a date.</em></p>
<h3>Use a calculated column that subtracts a different number of days based on a  status</h3>
<p>This is similar to the above method, but suppose we have a choice column called  Service Type that can either be Simple, Average or Complex. Again we want the  alerts for Simple equipment servicing to be 5 days in advance, Average to be 10 days and Complex to be 30.</p>
<p>This calculation will return the number of days to add :-</p>
<pre>=IF([Service Type]="Complex",30,IF([Service Type]="Average",15,5))</pre>
<p>Adding in ISBLANK as shown above gives</p>
<pre>=IF(ISBLANK([Service Date]),"",[Service Type] + IF([Service Type]="(Complex",30,IF([Service Type]="(2) Normal",15,5)))</pre>
<p>Or broken down for easy reading</p>
<table style="width: 100%;" border="0">
<tbody>
<tr>
<td style="padding-right: 20px;">
<pre>=IF(ISBLANK([Service Date]),"",</pre>
<pre>   [Service Date] +</pre>
<pre>      IF([Service Type]="Complex",30,</pre>
<pre>      IF([Service Type]="Average",15,</pre>
<pre>      5 )))</pre>
</td>
<td>
<pre><em>If the service date is blank then then the result is blank

else the result is [Service Date] +</em></pre>
<pre><em>   + 30 if Complex service
   or + 15 if Average service</em></pre>
<pre><em>   or +5 otherwise</em></pre>
</td>
</tr>
</tbody>
</table>
<p>So again we would create a calculated column called Alert Date, use the above  formula and setup a Reminder web part to send an email when the Alert Date is  Overdue (or Due Today).</p>
<p>The advantage of this method is that you are not relying on users entering  the correct figure in an Alert Days column and you can later change everything  by updating the formula, suppose you&#8217;ve now decided that you need 45 days notice  of complex services. The disadvantage is reduced flexibility.</p>
<h3>Using multiple Reminder Web Parts</h3>
<p>You can setup <a href="http://www.pentalogic.net/sharepoint-reminder/manual.aspx?Page=faq%2fcreateaview%2ffaq_createaview.htm" target="_blank"> Views</a> in SharePoint for various subsets of your list (think of 3 views  showing simple, average or complex equipment services). You could then setup 3  different reminder web parts set to <a href="http://www.pentalogic.net/sharepoint-reminder/manual.aspx?Page=webpart%2fconfig_list.htm" target="_blank"> watch the records in these views</a> and each web part could be set to send an  email alert a certain number of days in advance.</p>
<p>The advantage of this method is that any part of the configuration can be  different, for example you may wish to send the alerts about complex services to  different people or have a different subject line.</p>
<p style="text-align: center;"><a href="http://www.pentalogic.net/sharepoint-products/reminder/reminder-download"><img class="size-full wp-image-1398 aligncenter" title="reminder dowmload" src="http://blog.pentalogic.net/wp-content/uploads/2010/07/reminder-dowmload.jpg" alt="SharePoint Reminder Webpart Free Trial Dowmload" width="350" height="130" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pentalogic.net/2009/06/setting-variable-due-in-or-overdue-by-time/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

