<?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>SUPERNOVA &#187; SharePoint Designer 2007</title>
	<atom:link href="http://blog.metrostarsystems.com/tag/sharepoint-designer-2007/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.metrostarsystems.com</link>
	<description>Stellar Social Media &#38; Technology Solutions</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:59:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Performing Date / Time Calculation in DVWP Using XSL</title>
		<link>http://blog.metrostarsystems.com/2009/11/13/performing-datetime-calculation-in-dvwp-using-xslt/</link>
		<comments>http://blog.metrostarsystems.com/2009/11/13/performing-datetime-calculation-in-dvwp-using-xslt/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 20:51:12 +0000</pubDate>
		<dc:creator>Chris Lincoln</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Data View Web Part]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint Designer 2007]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=2084</guid>
		<description><![CDATA[SharePoint Data View Web Parts (DVWP) may be leveraged to use complex conditional logic using XSL.  Such an example would be to highlight List Items in the DVWP that meet certain date/time criteria.  The following example will show how XSL may be leverage as a simple and robust solution. Case: New tasks (i.e. List Items created within<em> ... </em>]]></description>
			<content:encoded><![CDATA[<p>SharePoint Data View Web Parts (DVWP) may be leveraged to use complex conditional logic using XSL.  Such an example would be to highlight List Items in the DVWP that meet certain date/time criteria.  The following example will show how XSL may be leverage as a simple and robust solution.</p>
<h2>Case:</h2>
<p>New tasks (i.e. List Items created within the last 30 minutes) in a User&#8217;s &#8220;My Tasks&#8221; DVWP are highlighted to bring attention to these high priority items.</p>
<h2>Undesirable Solution:</h2>
<p>Use a declarative workflow to check if the task is no longer new and reset a new &#8221;flag&#8221;.  XSL will check the &#8220;flag&#8221; when the DVWP renders and display tasks appropriately.</p>
<p>The workflow would follow the logic:</p>
<ol>
<li>Start on Item creation</li>
<li>Pause for 30 minutes</li>
<li>Set hidden boolean field value (<em>isNew</em>) to false</li>
</ol>
<p>The DVWP then uses XSL to check the value of <em>isNew</em> to set the CSS class of a TR, TD, or some other HTML DOM element:</p>
<p style="padding-left: 30px;">&lt;xsl:if test=&#8221;@isNew = 1&#8243;&gt;&lt;xsl:attribute name=&#8221;class&#8221;&gt;newTask&lt;/xsl:attribute&gt;&lt;/xsl:if&gt;</p>
<p>This solution is not optimal as a long-term workflow runs on every List Item.  As a result, numerous workflows may be running on the server causing decreased server performance.</p>
<h2>Solution:</h2>
<p>Use XSL to check if a Task is new and set the CSS class appropriately when the DVWP renders.</p>
<p><strong>Logic</strong></p>
<p>For simplicity of the XPath expression, a task may be considered new if both of these conditions are true:</p>
<ol>
<li>The date of creation is the current day (i.e. today)</li>
<li>The time of creation occurs less than 30 minutes before the current time (i.e. now)</li>
</ol>
<p>(This logic will not handle Tasks assigned from 23:41 to 23:59 as new after 00:00 of the next day.  Such Tasks may be handled with a seperate XPath expression to properly determine their new condition.)</p>
<p><span id="more-2084"></span></p>
<p><strong>Comparing the Date</strong></p>
<p>Checking that the date of creation is today requires a comparison of equality between two dates.  Therefore, it is possible to use the out-of-the-box (OOTB) &#8221;equal to&#8221; operator; unlike the &#8220;equal to&#8221; and &#8220;not equal&#8221; to operators, other operators (e.g. &#8220;numerical addition&#8221;, &#8221;less than&#8221;, etc.) require numerical arguments.  <em>Created</em> must be formatted properly as it is stored in the International Organization for Standardization (ISO) ISO8601 format (YYYY-MM-DDTHH:MM:SSZ) and therefore contains data other than the date.  The method <em>FormatDateTime()</em> (see <a title="MSDN SharePoint Developer Center" href="http://msdn.microsoft.com/en-us/library/dd583143(office.11).aspx#officesharepointddwrt_formatdatetime" target="_blank">MSDN SharePoint Developer Center</a>) requires the date as a textual argument and thus <em>Created</em> must be converted to a string using the method <em>string()</em>.  For accuracy, the method <em>FormatDateTime()</em> is used as it allows for the explicit definition of date/time formatting.  In this example, the format &#8220;MM/dd/yyyy&#8221; is used.  For accuracy, today&#8217;s date (i.e. <em>ddwrt:Today()</em>) must undergo the same formatting procedure.</p>
<p>The XPath expression to compare the dates is:</p>
<p style="padding-left: 30px;">ddwrt:FormatDateTime(string(@Created),1033,&#8221;MM/dd/yyyy&#8221;) = ddwrt:FormatDateTime(string(ddwrt:Today()),1033,&#8221;MM/dd/yyyy&#8221;)</p>
<p><strong>Comparing the Time</strong></p>
<p>The time of creation from <em>Created</em> may be retrieved by formatting the ISO8601 value using the method <em>FormatDateTime()</em> and a date/time format of &#8220;hhmmss&#8221;.  The format &#8220;hhmmss&#8221; is used so that each component of time (i.e. hour, minute, second) may be easily retrieved individually.  Each component may be retrieved using these XPath expressions:</p>
<p style="padding-left: 30px;">hour: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),2,2)<br />
minute: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),4,2)<br />
second: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),6)</p>
<p>Each component of time will be converted to the basic time unit.  In this example, the basic time unit is minutes (as the duration of the new condition is &#8220;30 minutes&#8221;).  Each component converted to minutes may be retrieved with these XPath expressions:</p>
<p style="padding-left: 30px;">hour: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),2,2) * 60<br />
minute: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),4,2)<br />
second: substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),6) div 60</p>
<p>Adding each component converted to minutes will provide the time as minutes since 00:00 of that day.  This &#8220;minute-time&#8221; new may be calculated using the XPath expression:</p>
<p style="padding-left: 30px;">(substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),2,2) * 60) + substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),4,2) + (substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),6) div 60)</p>
<p>As tasks are new if created within the past 30 minutes (i.e. the difference between the time of creation and current time is less that 30 minutes), a task may be determined to be new using the XPath expression:</p>
<p style="padding-left: 30px;">((substring(string(ddwrt:FormatDateTime(string(ddwrt:TodayIso()),1033,&#8221;hhmmss&#8221;)),2,2) * 60) + substring(string(ddwrt:FormatDateTime(string(ddwrt:TodayIso()),1033,&#8221;hhmmss&#8221;)),4,2) + (substring(string(ddwrt:FormatDateTime(string(ddwrt:TodayIso()),1033,&#8221;hhmmss&#8221;)),6) div 60)) - ((substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),2,2) * 60) + substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),4,2) + (substring(string(ddwrt:FormatDateTime(string(@Created),1033,&#8221;hhmmss&#8221;)),6) div 60)) &lt; 30</p>
<p>The XPath expression may be abstracted as: (the current time in minutes) &#8211; (the created time in minutes) &lt; 30 minutes.</p>
<p><strong>Durations Greater than 24 hours</strong></p>
<p>If a duration to check surpasses 24 hours, calculation must be performed on the date values.  As no OOTB date/time comparison operators exist, the dates must be converted to numbers.  Dates may be converted to numbers using the format &#8220;yyyyMMdd&#8221;; this format is acceptable for numeric comparison as dates inherently have hiearchical components; years are superior to months which are superior to days (e.g. any date in 2009 is newer than any date in 2008 and any day in December is newer than any day in November of the same year).  The difference between two dates (in days) may be calculated with the XPath expression:</p>
<p style="padding-left: 30px;">number(ddwrt:FormatDateTime(string(ddwrt:TodayIso()),1033,&#8221;yyyyMMdd&#8221;)) &#8211; number(ddwrt:FormatDateTime(string(@Created),1033,&#8221;yyyyMMdd&#8221;))</p>
<h2>Conclusion</h2>
<p>Generally, XSL enables powerful conditional rendering of DVWP that may greatly enhance the basic functionality found with OOTB DVWP.  The provided example illustrates how XSL and XPath expressions may be used to perform logical calculations and comparisons using basic numerical operators.  This capability may be used to benefit server performance and reduce SharePoint &#8220;clutter&#8221; by avoiding unecessary columns.  The use of XSL should be considered but is not appropriate for all scenarios (e.g. some data is best stored in a column rather than dynamically calculated).</p>
<h2><span style="color: #800000;">UPDATED:</span> 17 NOV 2009</h2>
<p>The method <em>TodayIso()</em> (see <a title="MSDN SharePoint Developer Center" href="http://msdn.microsoft.com/en-us/library/dd583143(office.11).aspx#officesharepointddwrt_todayiso" target="_blank">MSDN SharePoint Developer Center</a>) is incorrectly specified to return the current date and time in ISO8601 (see <a title="W3C" href="http://www.w3.org/TR/NOTE-datetime" target="_blank">World Wide Web Consortium</a> and <a title="Wikipedia" href="http://en.wikipedia.org/wiki/ISO_8601" target="_blank">Wikipedia</a>).  The returned format is not ISO8601 as the value is terminated by the character &#8220;Z&#8221; (i.e. Zulu) incorrectly denoting the time is in UTC.  The returned time is in the server&#8217;s local time zone.  Therefore, a server hosted in the Eastern Time Zone (i.e. UTC-5) may return the value &#8220;2010-01-01T00:00:00Z&#8221; rather than the appropriate value &#8221;2010-01-01T05:00:00Z&#8221;.  Therefore, this example assumes that any servers are set to UTC.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2009/11/13/performing-datetime-calculation-in-dvwp-using-xslt/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Show Elapsed Modified Time in a Document Library</title>
		<link>http://blog.metrostarsystems.com/2009/11/03/show-elapsed-modified-time-in-a-document-library/</link>
		<comments>http://blog.metrostarsystems.com/2009/11/03/show-elapsed-modified-time-in-a-document-library/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 19:10:23 +0000</pubDate>
		<dc:creator>Ross Beurmann</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Document Libraries]]></category>
		<category><![CDATA[Elapsed Time]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[sha]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint Designer 2007]]></category>
		<category><![CDATA[SharePoint WorkFlow]]></category>
		<category><![CDATA[[Today]]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=2031</guid>
		<description><![CDATA[Introduction The requirement has come to fruition to see the elapsed time from the &#8220;Modified Date&#8221; to &#8220;Now&#8221; on a reports document library. This is not possible in a calculated value unfortunately do to [Today] and [Me] values being consumed in a calculated value are considered &#8220;Volatile&#8221; by SharePoint out of the box. These use<em> ... </em>]]></description>
			<content:encoded><![CDATA[<h1>Introduction</h1>
<p>The requirement has come to fruition to see the elapsed time from the &#8220;Modified Date&#8221; to &#8220;Now&#8221; on a reports document library.  This is not possible in a calculated value unfortunately do to [Today] and [Me] values being consumed in a calculated value are considered &#8220;Volatile&#8221; by SharePoint out of the box.  These use the core MOSS/WSS functions and since the list is 100% dynamic it doesn&#8217;t pull session or current state information before loading the list on page load.  Every possible solution was attempted prior to using this custom solution.  Although this is all &#8220;client side&#8221; customization all methods of using out of the box methods were tried prior to this solutions development, the downfall being that even when [Today] was able to be used in a calculated value it did not record the time, only the current date.</p>
<h1>Required Items</h1>
<p>This solution involves slight modification of Meta Data through a simple SharePoint Designer workflow, a short JavaScript function, and the creation of a &#8220;Last Updated&#8221; field that is a Date and Time field.  Below are step by step instructions with screen shots of how to properly customize any List or Document Library to use this functionality.  SharePoint Designer, .NET Frame Work 3.5, and WSS 3.0 are required to implement this solution.</p>
<h1>Elapsed Time</h1>
<p>Create or open an existing document library and go to settings.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed1.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 1 Document Library Settings<br />
</strong></span></p>
<p>Click Create Column</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed2.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 2 Create Column<br />
</strong></span></p>
<p>Name the Column &#8220;Last Updated&#8221; (Red) and make it a Date &amp; Time column (Blue)</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed3.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 3 Configure Column</strong></span></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong><span id="more-2031"></span><br />
</strong></span></p>
<p>Click Save, and go back to the Document Library page.  Click Site Actions, and Edit Page.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed4.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 4 Edit Page<br />
</strong></span></p>
<p>Click Add a Web Part and select a Content Editor Web Part and click add.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed5.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 5 Add a Web Part<br />
</strong></span></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed6.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 6 Content Editor Web Part<br />
</strong></span></p>
<p>Select Edit on the Content Editor Web Part and select Modified Shared Web Part</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed7.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 7 Modify Web Part<br />
</strong></span></p>
<p>Select source editor and copy the following into the source box and click save.</p>
<p>I used the below code from this website: http://www.endusersharepoint.com/2009/01/23/jquery-for-everyone-replacing-today/</p>
<p><strong>Source:<br />
</strong></p>
<p><em>&lt;script src=&#8221;http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;<br />
</em></p>
<p><em>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
</em></p>
<p><em>$(function() {<br />
</em></p>
<p><em> var str = &#8220;Last Updated&#8221;; //change this based on col header<br />
</em></p>
<p><em> var today = new Date();<br />
</em></p>
<p><em> today = Date.parse(today)/1000;<br />
</em></p>
<p><em> var a=0;<br />
</em></p>
<p><em> var headers = $(&#8220;table.ms-listviewtable:first&gt; tbody&gt; tr:first th&#8221;).get();<br />
</em></p>
<p><em> $.each(headers, function(i,e){<br />
</em></p>
<p><em> x = $(e).contents().find(&#8220;a[title*='"+str+"']&#8220;).length;<br />
</em></p>
<p><em> a = x &gt; 0 &amp;&amp; i &gt; a ? i : a;<br />
</em></p>
<p><em> });<br />
</em></p>
<p><em> var dArray = $(&#8220;table.ms-listviewtable:first&gt; tbody&gt; tr:gt(0)&#8221;).find(&#8220;&gt;td:eq(&#8220;+a+&#8221;)&#8221;).get()<br />
</em></p>
<p><em> $.each(dArray, function(i,e){       �<br />
</em></p>
<p><em>var d1 = Date.parse($(e).text())/1000;<br />
</em></p>
<p><em> var dd = (today-d1)/86400;<br />
</em></p>
<p><em> var dh = (dd-Math.floor(dd))*24;<br />
</em></p>
<p><em> var dm = (dh-Math.floor(dh))*60;<br />
</em></p>
<p><em> var time = ((Math.floor(dd) &gt; 0 ? Math.floor(dd) +&#8221; days, &#8221; : &#8220;&#8221;)+<br />
</em></p>
<p><em> (Math.floor(dh) &gt; 0 ? Math.floor(dh)+&#8221; hrs, &#8221; : &#8220;&#8221;)+<br />
</em></p>
<p><em> (Math.floor(dm)+&#8221; min&#8221;));<br />
</em></p>
<p><em> $(e).text(time);<br />
</em></p>
<p><em> });<br />
</em></p>
<p><em>});<br />
</em></p>
<p><em>&lt;/script&gt;<br />
</em></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed8.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 8 Source Editor Selection<br />
</strong></span></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed9.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 9 Source Editor Input<br />
</strong></span></p>
<p>Open the page in SharePoint Designer and create a new workflow file.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed10.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 10 Create a Workflow<br />
</strong></span></p>
<p>Name the workflow as &#8220;SetLUAsModified&#8221; select the list to attach as the document library you are using and select on create and on edit as when the workflow will run.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed11.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 11 Set Last Updated Time<br />
</strong></span></p>
<p>Click next and now create your Action, we are setting the last updated field to equal modified.  Go to the Actions Drop down and select set field in current item (Red), then set value 1 as &#8220;Last Updated&#8221; and Value 2 as &#8220;Current Item&#8221; &#8220;Modified&#8221; (Blue)</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed12.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 12 Set Field<br />
</strong></span></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed13.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 13 Set Last Updated<br />
</strong></span></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/110309_1910_ShowElapsed14.png" alt="" /></p>
<p><span style="color:#4f81bd; font-family:Tahoma; font-size:9pt"><strong>Figure 14 Set Modified<br />
</strong></span></p>
<p>Save the Workflow and go back to the site, add a document to the library or edit an existing document and the &#8220;Last Updated&#8221; field will change to 0 minutes.</p>
<p><img class="alignnone size-full wp-image-2060" title="testResult" src="http://blog.metrostarsystems.com/wp-content/uploads/2009/11/testResult2.jpg" alt="testResult" width="612" height="147" /></p>
<p>Figure 15 Test Results</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2009/11/03/show-elapsed-modified-time-in-a-document-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>“Versioning” Update</title>
		<link>http://blog.metrostarsystems.com/2009/10/23/versioning-update/</link>
		<comments>http://blog.metrostarsystems.com/2009/10/23/versioning-update/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 22:15:58 +0000</pubDate>
		<dc:creator>Ross Beurmann</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Calculated Value]]></category>
		<category><![CDATA[share]]></category>
		<category><![CDATA[SharePoi]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint Designer 2007]]></category>
		<category><![CDATA[SharePoint WorkFlow]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=1966</guid>
		<description><![CDATA[So the customer came back with a change to the “Versioning” request which was instead of Displaying the date to display the “Version” count.  This has lead me down an interesting change of the workflow which included the addition of a List to hold the version count as well as a calculation in the work<em> ... </em>]]></description>
			<content:encoded><![CDATA[<p>So the customer came back with a change to the “Versioning” request which was instead of Displaying the date to display the “Version” count.  This has lead me down an interesting change of the workflow which included the addition of a List to hold the version count as well as a calculation in the work flow which is no a couple of steps longer.  The “ChangeTitle” step was not changed at all however the “ChangeName” field was changed due to the numbering system rather than the date.  I also had to change the NameDate Field to be the NameCount Field which changes the file name to “%FileName%-%Version #%.” The custom list for the version number is also going to be used to assist fellow MSS employee Chris Lincoln in creating a JavaScript Mouse over in the Document Library showing the Description of each grouping or reports by title, which in itself will be a pretty cool blog entry for next week!  Please see my previous blog post <a href="../2009/10/23/sharepoint-reports-versioning-through-name-change/">here</a> to get the background of this issue/resolution.</p>
<p>The Document Library drives this Workflow not the List.</p>
<p>As seen in the previous blog, Step 1 is the ChangeTitle step and this copies the File Name into the Title Column, the rationale was to maintain unique file names but keep the documents grouped by non-unique Titles.</p>
<p>Step 2 is new and it is the “CreateListItem” step.  This creates the item in the list if it not already there.  Validating that it is not there maintains only one record in the List while allowing for multiple records in the Library.  I validate it off of the current item (Document) title but it ensures that there is no such record in the List which maintains an accurate “Version” count.  Once this validation has completed the list Item is completed, if there is already an item with like Title in the list it skips to Step 3 which sets the Version count.  The Item is created the Title is copied from the Current Item (Document) and the Version Count is set to 0.  Please see the Screen Shots Below for “CreateListItem” Step.</p>
<p>Step 3 adds 1 to the current version # in the List.  If this is a new document it becomes Version 1, if it is an old document it is version x + 1.  We will use this field to create a variable to add to our New Calculated value we are calling this step “SetCount” and it updates the lists count and stores a “calc” variable.  The calc variable set in step three will enable the “Versioning” as seen in Step 4.  Please see the Screen Shots Below.</p>
<p>Step 4 has been modified slightly, as before the pause was to give time for the File Name to enter into the calculated value, since this step actually places the “Count” Value into the Item and Calculated Values pull from the Item itself the pause has been moved to below the input of the calc variable into the “Count” field on the current item.  The pause allows for the calculated value NameCount to wait for the Count variable to be added which takes about 30 seconds, however 1 minute is the shortest pause possible in SharePoint Designer.  Please see the screen shot below:</p>
<p>There will be a third post regarding this effort as far as adding the JavaScript mouse over tool tips for the groups by title in the default view.</p>
						<div class="post-b " id="post-5600">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2012/02/04/irequiressessionstate-and-long-running-asynchronous-http-handlers/">IRequiresSessionState and long running Asynchronous HTTP Handlers</a>
						</h2>
						<span class="date"><span>Posted on February 4th, 2012 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>The other day I learned something interesting about the inner workings of ASP .Nets session state management.  One of the nice features it provides is automatically making usage of the session state thread safe between the various threads which may be handling requests from the same user (with the same sessionId). Apparently the way it<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2012/02/04/irequiressessionstate-and-long-running-asynchronous-http-handlers/#respond" title="Comment on IRequiresSessionState and long running Asynchronous HTTP Handlers">No Comments</a></span>
						<a title="Permanent Link to IRequiresSessionState and long running Asynchronous HTTP Handlers" href="http://blog.metrostarsystems.com/2012/02/04/irequiressessionstate-and-long-running-asynchronous-http-handlers/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5583">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2012/01/24/setting-up-ssl-on-a-microsoft-azure-application/">Setting up SSL on a Microsoft Azure application</a>
						</h2>
						<span class="date"><span>Posted on January 24th, 2012 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>Recently I as involved with adding SSL to a site which is hosted within Microsft&#8217;s Aure platform.  Overall the process went pretty smoothly having used the guide from MSDN: http://msdn.microsoft.com/en-us/library/windowsazure/ff795779.aspx &nbsp; The one thing it forgets to mention is that along with server certificate you also need all of the certificates along the chain of trust back<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2012/01/24/setting-up-ssl-on-a-microsoft-azure-application/#respond" title="Comment on Setting up SSL on a Microsoft Azure application">No Comments</a></span>
						<a title="Permanent Link to Setting up SSL on a Microsoft Azure application" href="http://blog.metrostarsystems.com/2012/01/24/setting-up-ssl-on-a-microsoft-azure-application/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5570">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2012/01/06/updating-large-quantities-of-data-in-sql-azure/">Updating large quantities of data in SQL Azure</a>
						</h2>
						<span class="date"><span>Posted on January 6th, 2012 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>Recently I ran into a scenario where I had a production database which contained a table with 1.4 million records in which I wanted to convert a varchar column containing numbers to a bigint column. I used a backup of the database to try out a few different methods; at first I tried simply running<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2012/01/06/updating-large-quantities-of-data-in-sql-azure/#respond" title="Comment on Updating large quantities of data in SQL Azure">No Comments</a></span>
						<a title="Permanent Link to Updating large quantities of data in SQL Azure" href="http://blog.metrostarsystems.com/2012/01/06/updating-large-quantities-of-data-in-sql-azure/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5557">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/11/04/handy-string-parsing-extension-methods/">Handy String Parsing Extension Methods</a>
						</h2>
						<span class="date"><span>Posted on November 4th, 2011 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>Since I&#8217;ve never particularly liked the feel of C#&#8217;s int.TryParse and bool.TryParse methods I decided to create some extension methods for strings which I feel like make the code using them much more readable: &nbsp; /// &lt;summary&gt; /// Converts a string to an int, if the string cant be parsed then null is returned /// &lt;/summary&gt; ///<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/11/04/handy-string-parsing-extension-methods/#respond" title="Comment on Handy String Parsing Extension Methods">No Comments</a></span>
						<a title="Permanent Link to Handy String Parsing Extension Methods" href="http://blog.metrostarsystems.com/2011/11/04/handy-string-parsing-extension-methods/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5510">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/11/02/metrostar-systems-supports-the-36th-marine-corps-marathon/">MetroStar Systems Supports the 36th Marine Corps Marathon</a>
						</h2>
						<span class="date"><span>Posted on November 2nd, 2011 in <a href="http://blog.metrostarsystems.com/category/ourculture/" title="View all posts in Our Culture" rel="category tag">Our Culture</a>.</span></span>
						<p>It was 3:45a.m., Sunday October 30th&#8230;Theresa and I sat in my car with the heat on full blast gearing up to be outside for the next six hours (at least!). It was still dark as night, but not far in the distance you could see the buzz and commotion of people setting up for one<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/11/02/metrostar-systems-supports-the-36th-marine-corps-marathon/#respond" title="Comment on MetroStar Systems Supports the 36th Marine Corps Marathon">No Comments</a></span>
						<a title="Permanent Link to MetroStar Systems Supports the 36th Marine Corps Marathon" href="http://blog.metrostarsystems.com/2011/11/02/metrostar-systems-supports-the-36th-marine-corps-marathon/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5492">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/">Linq to SharePoint vs. CAML vs. SQL Performance</a>
						</h2>
						<span class="date"><span>Posted on October 25th, 2011 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>.</span></span>
						<p>On a project I&#8217;ve just recently started I was tasked to create some SharePoint web services which would serve up data stored in lists.  Having learned recently about a new tool for SharePoint 2010 called Linq to SharePoint I decided I would give it a try rather than taking my normal approach of using CAML<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/#comments" title="Comment on Linq to SharePoint vs. CAML vs. SQL Performance">2 Comments</a></span>
						<a title="Permanent Link to Linq to SharePoint vs. CAML vs. SQL Performance" href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5482">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/10/13/fedtalks2011/">FedTalks2011</a>
						</h2>
						<span class="date"><span>Posted on October 13th, 2011 in <a href="http://blog.metrostarsystems.com/category/community/" title="View all posts in Community" rel="category tag">Community</a>, <a href="http://blog.metrostarsystems.com/category/news/" title="View all posts in News" rel="category tag">News</a>, <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>.</span></span>
						<p>I had the pleasure of attending FedTalks2011 &#8211; an event held October 11, 2011 at the Warner Theater in Washington D.C. The event was hosted by FedScoop and brought together “the greatest minds in government and business technology to discuss how innovation can aid in the way government works.” I was introduced to top White<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/10/13/fedtalks2011/#respond" title="Comment on FedTalks2011">No Comments</a></span>
						<a title="Permanent Link to FedTalks2011" href="http://blog.metrostarsystems.com/2011/10/13/fedtalks2011/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5402">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/10/03/jennys-sharepoint-tip-rollup-items-across-a-site-collection-by-creating-a-cross-list-data-view-web-part/">Jenny&#8217;s SharePoint Tip:  Rollup items across a site collection by creating a cross list data view web part.</a>
						</h2>
						<span class="date"><span>Posted on October 3rd, 2011 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>While working on a client project I had a request to rollup all  calendar items across a single site collection on the home page of the root site.  After reviewing several blogs describing how to create a cross list data view web part (dvwp) I was able to successfully create a solution per the client<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/10/03/jennys-sharepoint-tip-rollup-items-across-a-site-collection-by-creating-a-cross-list-data-view-web-part/#comments" title="Comment on Jenny&#8217;s SharePoint Tip:  Rollup items across a site collection by creating a cross list data view web part.">2 Comments</a></span>
						<a title="Permanent Link to Jenny&#8217;s SharePoint Tip:  Rollup items across a site collection by creating a cross list data view web part." href="http://blog.metrostarsystems.com/2011/10/03/jennys-sharepoint-tip-rollup-items-across-a-site-collection-by-creating-a-cross-list-data-view-web-part/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5309">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/">Jenny’s SharePoint Tip:  How to display “This Month” birthdays in a list using an XSLT filter</a>
						</h2>
						<span class="date"><span>Posted on September 30th, 2011 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>Anyone who has ever worked with SharePoint knows that creating filters on date values is not as straight forward as one would expect.  This example explains how to compile employee birthdays in a custom list that automatically displays only the current month’s birthdays.  With a few calculated columns, a data view, and minor XSLT this is easy to<em> &#8230; </em></p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/#respond" title="Comment on Jenny’s SharePoint Tip:  How to display “This Month” birthdays in a list using an XSLT filter">No Comments</a></span>
						<a title="Permanent Link to Jenny’s SharePoint Tip:  How to display “This Month” birthdays in a list using an XSLT filter" href="http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
						<div class="post-b " id="post-5272">
												<div class="post-content">
						<h2>
							<a href="http://blog.metrostarsystems.com/2011/09/20/using-powershell-to-update-content-editor-web-parts/">Using PowerShell to Update Content Editor Web Parts</a>
						</h2>
						<span class="date"><span>Posted on September 20th, 2011 in <a href="http://blog.metrostarsystems.com/category/technology/" title="View all posts in Technology" rel="category tag">Technology</a>, <a href="http://blog.metrostarsystems.com/category/tips/" title="View all posts in Tips &amp; Tricks" rel="category tag">Tips &amp; Tricks</a>.</span></span>
						<p>Have you ever been in a situation where you needed to programmatically update the content in Content Editor Web Part (CEWP)? Maybe you added some HTML that is breaking your page or maybe you’re moving your content to another domain and you have some hard coded links in your CEWP’s.</p>
<p>Well it turns out that it isn’t really that hard. In my situation we were working with the latter scenario above and within our environment we have many administrators who have created hard coded links within CEWP’s and in order to streamline the upgrade process I thought I would create a PowerShell script&#8230;</p>
					</div>
					<div class="clear"></div>
					<div class="post-footer">
						<span class="comm float-left"><a href="http://blog.metrostarsystems.com/2011/09/20/using-powershell-to-update-content-editor-web-parts/#respond" title="Comment on Using PowerShell to Update Content Editor Web Parts">No Comments</a></span>
						<a title="Permanent Link to Using PowerShell to Update Content Editor Web Parts" href="http://blog.metrostarsystems.com/2011/09/20/using-powershell-to-update-content-editor-web-parts/" class="read-more float-right">Continue reading...</a>
					<div class="clear"></div>			
					</div>
			</div> <!-- .post -->
			
	
	<div class="clear"></div>
	
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/09/20/using-powershell-to-update-content-editor-web-parts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Designer 2007 “failed to load the workflow”</title>
		<link>http://blog.metrostarsystems.com/2009/06/29/sharepoint-designer-2007-failed-to-load-the-workflow/</link>
		<comments>http://blog.metrostarsystems.com/2009/06/29/sharepoint-designer-2007-failed-to-load-the-workflow/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 15:22:10 +0000</pubDate>
		<dc:creator>Chris Lincoln</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[SharePoint Designer 2007]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=1014</guid>
		<description><![CDATA[To resolve the error &#8220;failed to load the workflow&#8221; when opening a declarative workflow in Microsoft SharePoint Designer 2007, please follow the steps provided below: Close Microsoft SharePoint Designer 2007 If using Microsoft Windows XP, navigate to the directory: C:\Documents and Settings\[USER NAME]\Application Data\Microsoft\SharePoint Designer\ProxyAssemblyCache\ If using Microsoft Windows Vista, navigate to the directory: C:\Users\[USER<em> ... </em>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.metrostarsystems.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p>To resolve the error &#8220;failed to load the workflow&#8221; when opening a declarative workflow in Microsoft SharePoint Designer 2007, please follow the steps provided below:</p>
<ol>
<li>Close Microsoft SharePoint Designer 2007</li>
<li>If using Microsoft Windows XP, navigate to the directory:<br />
<em>C:\Documents and Settings\[USER NAME]\Application Data\Microsoft\SharePoint Designer\ProxyAssemblyCache\<br />
</em>If using Microsoft Windows Vista, navigate to the directory:<br />
<em>C:\Users\[USER NAME]\AppData\Roaming\Microsoft\SharePoint Designer\ProxyAssemblyCache\</em></li>
<li>Delete all folders with the naming convention <em>12.x.x.xxxx</em></li>
<li>Start Microsoft SharePoint Designer 2007 and open the desired workflow</li>
</ol>
<p>Please be aware that it may be necessary to perform these steps multiple times.</p>
<p><strong>UPDATE (09/28/2009):<br />
</strong>A possible cause of this behavior may be related to the use of custom activities within the workflow.  If the above solution does not resolve the issue, it may be necessary to redeploy/reinstall any custom activities that the workflow may reference.</p>
<p>[<a title="“Failed to load the workflow” Error Message in SharePoint Designer" href="http://www.sharepointblogs.com/smuller/archive/2007/07/20/failed-to-load-the-workflow-error-message-in-sharepoint-designer.aspx" target="_blank">Scott Muller's SharePoint Blog</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2009/06/29/sharepoint-designer-2007-failed-to-load-the-workflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

