<?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</title>
	<atom:link href="http://blog.metrostarsystems.com/tag/sharepoint/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>Linq to SharePoint vs. CAML vs. SQL Performance</title>
		<link>http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/</link>
		<comments>http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/#comments</comments>
		<pubDate>Tue, 25 Oct 2011 13:59:26 +0000</pubDate>
		<dc:creator>Lee Kohn</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CAML]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Preformance]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SPQuery]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[WFE]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=5492</guid>
		<description><![CDATA[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> ... </em>]]></description>
			<content:encoded><![CDATA[<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 inside of SPQuery objects.  Linq to SharePoint is supposed to speed up the development process by creating a DAL for you based on the structure of your SharePoint lists with type safety on all of the lists and the relationships within.  Also making use of Linq to write queries means there would no need for the fairly cumbersome CAML queries which all SharePoint developers have come to know and love.</p>
<p>After a day or so of development with this new tool the one thing that became immediately obvious to me was how limited the actual queries could be.  Perhaps it was because of the data model/relationships of the lists but the majority of the queries I needed to run could not be done with pure Linq since Linq to SharePoint can only run queries which span across no more than two lists which was a huge problem for me since many of my queries needed to span upwards of four lists. (I probably should have noticed that in the documentation).</p>
<p>Query limitations aside I was able to get my code working and decided to do some due diligence and fire up a load tester to see what kind of performance these web services would provide.  What I found was pretty shocking.</p>
<p><a href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/linq/" rel="attachment wp-att-5493"><img class="alignnone size-medium wp-image-5493" title="Linq to SharePoint Perf" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/linq-300x217.png" alt="" width="300" height="217" /></a></p>
<p>After reaching around six requests per second the CPU of the WFE (web front end) would become maxed out with page response times hitting nearly 2 seconds.  This seemed like a surprisingly low amount of performance since the server it was running on had four CPUs and four GB of ram (albeit it is a VM) so I decided to see where all of that CPU time was being spent so I hooked up the Visual Studio profiler and noticed that over 80% of the time was being spent in the inner workings of the Linq to SharePoint code.</p>
<p>At this point I decided to see what would happen if I replaced all of the Linq to SharePoint queries with plain old CAML queries running against the SPList.GetDataTable method.  The load tester was then run and came up with these numbers:</p>
<p><a href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/caml2/" rel="attachment wp-att-5501"><img class="alignnone size-medium wp-image-5501" title="CAML Query" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/caml2-300x217.png" alt="" width="300" height="217" /></a></p>
<p>By using CAML queries the WFE was able to handle around 20 requests per second until its CPU maxed out, quite an improvement!</p>
<p>Then per my bosses request I created the same data model with a plain old relational database (SQL 2008r2) to see what the performance for the web service would be like with SQL as opposed to SharePoint.</p>
<p><a href="http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/sql/" rel="attachment wp-att-5502"><img class="alignnone size-medium wp-image-5502" title="SQL Query" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/sql-300x217.png" alt="" width="300" height="217" /></a></p>
<p>As most people would suspect this preformed by far the best with the WFE being able to handle around 50 requests per second!</p>
<p>&nbsp;</p>
<p>Although this may not have been the most scientific test in the world it definitely shows the overhead which Linq to SharePoint introduces as well as the overhead which SharePoint lists have over plain old SQL.  The lesson I&#8217;ve taken away from this is that Linq to SharePoint is okay for smaller/simpler projects where performance is not as important as getting the development done quickly however I will be staying away from it in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/10/25/linq-to-sharepoint-vs-caml-vs-sql-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jenny&#8217;s SharePoint Tip:  Rollup items across a site collection by creating a cross list data view web part.</title>
		<link>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/</link>
		<comments>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</comments>
		<pubDate>Mon, 03 Oct 2011 20:55:21 +0000</pubDate>
		<dc:creator>Jennifer Hersko</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[content rollup]]></category>
		<category><![CDATA[Data View Web Part]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=5402</guid>
		<description><![CDATA[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> ... </em>]]></description>
			<content:encoded><![CDATA[<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 <em>several </em>blogs describing how to create a cross list data view web part (dvwp) I was able to successfully create a solution per the client request.  This blog provides step-by-step instructions for creating your own cross list dvwp.  </p>
<p>The below example creates a cross list dvwp that displays <em>all</em> calendar items <em>from across a site collection</em> on a web page or site.  After the cross list dvwp is created, any new sub site with a calendar list will have its entries compiled in the cross list dvwp. </p>
<p><strong><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp1.png" alt="" width="642" height="150" /></strong></p>
<p><strong style="font-size: 16px;">Things to know prior to starting  </strong></p>
<p><strong style="font-size: 12px;">List Server Template <br />
</strong>You need to know the list server template number for the list type you will querying for this solution.  I.e. A calendar list’s server template number is 106.  Each list type in SharePoint has a number associated with it and this number is required to create a cross list query.   For a listing of list types and their corresponding numbers,  visit this MSDN page: <a href="http://msdn.microsoft.com/en-us/library/dd340479(v=prot.13).aspx">http://msdn.microsoft.com/en-us/library/dd340479(v=prot.13).aspx</a></p>
<p><strong style="font-size: 12px;">Static/Internal Name versus Display Name for Columns<br />
</strong>Most often columns have two names; an internal name and a display name.  I.e. In a calendar list the <strong>Start Time</strong> column has an internal name of <strong>EventDate</strong>.  When creating a cross list query the internal names are required.  For more information on internal vs. display names, read this blog by Marc Anderson:  <a href="http://sympmarc.com/2009/12/11/staticname-versus-displayname-on-sharepoint-lists/">http://sympmarc.com/2009/12/11/staticname-versus-displayname-on-sharepoint-lists/</a> </p>
<p><strong style="font-size: 16px;">Keep in Mind</strong></p>
<p>There are pros and cons associated with using a cross list dvwp rather than purchasing a more robust 3rd party tool. <img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp2.png" alt="" width="702" height="127" /></p>
<p> <strong style="font-size: 16px;">Create a cross list query       </strong></p>
<p><strong> 1.</strong>  In the <strong>browser</strong>, add a list view web part to a web part page or a site page. <br />
 <img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp3.png" alt="" width="547" height="89" /></p>
<p><strong> 2.</strong>  Format the view – include all columns and in the order they should appear in the final product.<br />
<img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp4.png" alt="" width="485" height="208" /></p>
<p><strong> 3.</strong>  Open <strong>SharePoint Designer</strong>.  Navigate to the web page or site where the list web part was added and view in <strong>Split</strong> mode.<br />
<img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp5.png" alt="" width="223" height="91" /></p>
<p><strong>4. </strong> Convert the list view web part to a data view web part.  <strong>Right-click</strong> on the list view web part and choose <strong>Convert to XSLT Data View</strong>.<br />
<img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp6.png" alt="" width="311" height="227" /></p>
<p><strong> 5.</strong>  The dvwp needs to know <em>where</em> to query.  From the tool bar, choose <strong>Edit</strong>, then <strong>Find</strong>.</p>
<p style="padding-left: 30px;"><strong>a.    </strong>Search for <strong>&lt;ParameterBindings&gt;</strong> </p>
<p style="padding-left: 60px;"><em>After</em> the open &lt;ParameterBindings&gt; tag, add the following parameter binding to the list using <em>your</em> <strong>site/sub site</strong> information (<strong>NOTE:</strong>  your site information may be /site/, or /site/subsite/, or, /site/sub site/sub sub site/, etc.): </p>
<p style="padding-left: 60px;">&lt;parameterbinding Name=&#8221;WebURL&#8221; Location=&#8221;None&#8221; DefaultValue=&#8221;<strong>/site/subsite/</strong>&#8220;/&gt; </p>
<p style="padding-left: 30px;"><strong>b.  </strong>Search for <strong>&lt;xsl:param</strong> </p>
<p style="padding-left: 60px;">Above the first entry, add the following using <em>your</em> <strong>site/sub site</strong> information: </p>
<p style="padding-left: 60px;">&lt;xsl:param name=&#8221;WebURL&#8221;&gt;/site/subsite/&lt;/xsl:param&gt; </p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp7.png" alt="" width="284" height="321" />  </p>
<p><strong>6. </strong>  This section tells the query <em>what</em> columns to match and display.</p>
<p style="padding-left: 30px;"><strong>a. </strong> Search for <strong>&lt;DataSources&gt;</strong></p>
<p style="padding-left: 30px;"><strong>b. </strong> In the <strong>code pane</strong> in Designer, between the open &lt;DataSources&gt; and closing &lt;/DataSources&gt; tags, look for the id=&#8221;[id_name_here]&#8220;.  <strong>Copy the existing id name</strong> and save it somewhere.  You will need this information in <em>step 6d</em>.<br />
<img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp8.png" alt="" width="324" height="111" /></p>
<p style="padding-left: 30px;"><strong>c. </strong> In the code pane<strong>, delete</strong> the following code:  <strong><em>open</em> &lt;DataSources&gt;</strong> tag to the <strong><em>closing</em> &lt;/DeleteParameters&gt;</strong> tag and <em>all</em> code between. <span style="text-decoration: underline;">This should leave you with the open &lt;SelectParameters&gt; tag to the closing &lt;/DataSources&gt; tag</span>. </p>
<p style="padding-left: 30px;"><em><strong>d. </strong>Above</em> the open &lt;SelectParameters&gt; tag<strong> copy and paste</strong> the below open &lt;DataSources&gt; tag and following code and <em>modify</em> the items highlighted in yellow to match your list needs.</p>
<p style="padding-left: 60px;">&lt;DataSources&gt;&lt;SharePoint:SPDataSource runat=&#8221;server&#8221; DataSourceMode=&#8221;<span style="color: #ff0000;">Cross</span>List&#8221; SelectCommand=&#8221;&lt;View&gt;&lt;Webs Scope=&#8217;Recursive&#8217;&gt;&lt;/Webs&gt;&lt;Lists ServerTemplate=&#8217;<span style="background-color: yellow;">106</span>&#8216;&gt;&lt;/Lists&gt;&lt;ViewFields&gt;&lt;FieldRef Name=&#8217;<span style="color: #ff0000;">FileDirRef</span>&#8216;/&gt;&lt;FieldRef Name=&#8217;<span style="color: #ff0000;">ID</span>&#8216;/&gt;&lt;FieldRef Name=&#8217;<span style="background-color: yellow;">Location</span>&#8216;/&gt;&lt;FieldRef Name=&#8217;<span style="background-color: yellow;">Title</span>&#8216;/&gt;&lt;FieldRef Name=&#8217;<span style="background-color: yellow;">EventDate</span>&#8216;/&gt;&lt;FieldRef Name=&#8217;<span style="background-color: yellow;">EndDate</span>&#8216;/&gt;&lt;<span style="color: #ff0000;">ProjectProperty Name=&#8217;Title</span>&#8216;/&gt;&lt;/ViewFields&gt;&lt;Query&gt;&lt;/Query&gt;&lt;/View&gt;&#8221; UseInternalName=&#8221;True&#8221; id=&#8221;<span style="background-color: yellow;">datasource2</span>&#8220;&gt;</p>
<p style="padding-left: 60px;"><strong>CODE OVERVIEW </strong> </p>
<p style="padding-left: 60px;"><span style="background-color: yellow;">Highlighted text</span> – readers of this blog should replace highlighted text with values that correspond to their solution.  <br />
***I.e. If your cross list is NOT querying calendar lists, then the list server template of 106 should be replaced with the correct value.<br />
***The &lt;FieldRef Name&gt; tags tell the data view what columns to display.  If a column should appear in the dvwp, be sorted on, or filtered on, the column name MUST have a &lt;FieldRef Name&gt; tag.  NOTE:  You can have as many or few &lt;FieldRef Name&gt; tags as necessary.  </p>
<p style="padding-left: 60px;"><span style="color: #ff0000;">Text in red</span> should not be deleted. <br />
***The <strong>Cross</strong> added in the <strong>DataSourceMode</strong> is the key to searching across the site collection for items of the same list server type. <br />
***The <strong>FileDirRef</strong> reference identifies information about the file directory.  Do no delete this FieldRef.<br />
***The <strong>ProjectProperty Name=”Title/”</strong> reference populates the site name the list item is popultating from.  Do not delete this reference if you want to note what site the item in your query is pulling from. </p>
<p>Click anywhere in the <strong>design pane</strong> of Designer.  The dvwp should now contain  items from across the site collection that are saved to lists using the list server template you defined in step 6d.<br />
  <img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp9.png" alt="" width="646" height="192" /> </p>
<p><strong>7.</strong>  The Title field <span style="text-decoration: underline;">does not </span>link to item display forms.  To enable this functionality, search for <strong>select=&#8221;@Title&#8221;</strong> and locate the reference inside of a <strong>&lt;xsl:value-of  </strong>tag.</p>
<p style="padding-left: 30px;"><strong>a. </strong> The xsl:value-of tag that contains the <strong>@Title</strong> will reside inside of an &lt;a&gt; tag – delete the open &lt;a&gt; and closing &lt;/a&gt; tags and <em>all</em> code inside of it. </p>
<p style="padding-left: 30px;"><strong>b.</strong>  Replace the text with the following: </p>
<p style="padding-left: 60px;">&lt;a&gt;&lt;xsl:attribute name=&#8221;href&#8221;&gt;/&lt;xsl:value-of select=&#8221;substring-after(@FileDirRef,&#8217;;#&#8217;)&#8221; /&gt;/Dispform.aspx?ID=&lt;xsl:value-of select=&#8221;@ID&#8221; /&gt;&lt;/xsl:attribute&gt;&lt;xsl:value-of select=&#8221;@Title&#8221; /&gt;&lt;/a&gt;</p>
<p><strong>8. </strong> To add the site name where each item resides, <strong>Right-click</strong> the dvwp and choose <strong>Show Common Control Tasks</strong>, choose <strong>Edit Columns</strong>, then select <strong>ProjectProperty.Title</strong> and hit the <strong>Add</strong> button to display that column in the dvwp.  After the column is added, in the code pane, edit the column header to read as <strong>Site</strong>. </p>
<p> <img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp10.png" alt="" width="355" height="187" /></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp11.png" alt="" width="283" height="151" /></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/dvwp12.png" alt="" width="521" height="340" /> </p>
<p><strong> </strong><strong>NOTE:</strong> My example does not contain any name columns, but if it did…  Columns that display names will contain extra characters (D’oh!).  To correct this, edit the xsl command containing the column name (thanks to <a href="http://blog.metrostarsystems.com/author/lee-kohn/">Lee Kohnn</a> for helping me with this one).  Columns that display names include but are not limited to: AssignedTo, Requestor, Author, Editor. </p>
<p>Search for <strong>select=”@[Column Internal Name]”</strong> and locate the reference inside of a <strong>&lt;xsl:value-of</strong> tag. </p>
<p style="padding-left: 30px;">a.  Replace the existing xsl with the following: </p>
<p style="padding-left: 60px;">&lt;xsl:value-of select=&#8221;substring-after(@[Column Internal Name],&#8217;;#&#8217;)&#8221; /&gt; </p>
<p style="font-size: 16px;"><strong>The finished product</strong></p>
<p>Voila, my cross list dvwp!  As new sub sites are added, any calendar list that contains items will automatically populate in my dvwp.  As items and/or sub sites are deleted, my dvwp will automatically update by removing those items.<br />
<img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/10/final.png" alt="" width="575" height="175" /></p>
<p><strong style="font-size: 16px;">Links</strong></p>
<p>Here are some useful blogs I read to help unravel this solution for myself:</p>
<ul>
<li><a href="http://platinumdogs.wordpress.com/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/">http://platinumdogs.wordpress.com/2009/07/21/querying-document-libraries-or-pulling-teeth-with-caml/</a></li>
<li><a href="http://sympmarc.com/2009/04/21/displaying-columns-in-a-crosslist-dvwp/">http://sympmarc.com/2009/04/21/displaying-columns-in-a-crosslist-dvwp/</a></li>
<li><a href="http://www.manliane.com/kb/157/">http://www.manliane.com/kb/157/</a></li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>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/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Jenny’s SharePoint Tip:  How to display “This Month” birthdays in a list using an XSLT filter</title>
		<link>http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/</link>
		<comments>http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/#comments</comments>
		<pubDate>Fri, 30 Sep 2011 20:16:27 +0000</pubDate>
		<dc:creator>Jennifer Hersko</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[tips & tricks]]></category>
		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=5309</guid>
		<description><![CDATA[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> ... </em>]]></description>
			<content:encoded><![CDATA[<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 accomplish.</p>
<p>Figure 1 displays a screenshot my configured Birthdays list which displays only <em>current</em> month birthday entries on the home page of my site.  To create your own list that filters by current month follow the below steps. <img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/figure1.png" alt="" width="519" height="136" /></p>
<p><strong style="font-size: 16px;"><br />
Getting Started &#8211; List Configuration </strong>(These steps are completed in the browser.)</p>
<p>1. Create a <strong>custom list</strong> and name it <strong>Birthdays</strong>.</p>
<p>2. Create the following columns:</p>
<p style="padding-left: 30px;">Column 1)  Birthday (birthday)  /  Date and Time  /  Field is Optional</p>
<p style="padding-left: 30px;">Column 2)  Birthday Month (birthdaymonth) / Calculated Column / Field is Hidden</p>
<p style="padding-left: 60px;">=CHOOSE(MONTH(Birthday),&#8221;January&#8221;,&#8221;February&#8221;,&#8221;March&#8221;,&#8221;April&#8221;,&#8221;May&#8221;,&#8221;June&#8221;,&#8221;July&#8221;,&#8221;August&#8221;,&#8221;September&#8221;,<br />
&#8220;October&#8221;,&#8221;November&#8221;,&#8221;December&#8221;)</p>
<p style="padding-left: 30px;">Column 3)  Day (day) / Calculated Column / Field is Hidden</p>
<p style="padding-left: 60px;">=&#8221;"&amp;DAY(Birthday)</p>
<p style="padding-left: 30px;">Column 4)  Employee (Title) / Single line of text / Field is Optional</p>
<p style="padding-left: 30px;">Column 5)  Month (month) / Calculated Column / Field is Hidden</p>
<p style="padding-left: 60px;">=CHOOSE(MONTH(Birthday),&#8221;01&#8243;,&#8221;02&#8243;,&#8221;03&#8243;,&#8221;04&#8243;,&#8221;05&#8243;,&#8221;06&#8243;,&#8221;07&#8243;,&#8221;08&#8243;,&#8221;09&#8243;,&#8221;10&#8243;,&#8221;11&#8243;,&#8221;12&#8243;)</p>
<p style="padding-left: 30px;">Your column settings should display as in <strong>Figure 2</strong> so that users <span style="text-decoration: underline;">do not</span> see the hidden fields when a new birthday item is created.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/2.png" alt="" width="366" height="180" /></p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/figure3.png" alt="" width="543" height="136" /></p>
<p>3.  Create a view in the Birthdays list and name it <strong>currentbirthdays</strong>.  Columns to display are:<br />
1- Birthday Month, 2- Day (ascending), and 3- Month (ascending).</p>
<p><strong style="font-size: 16px;"><br />
Birthday list content and configuration </strong></p>
<p>Before proceeding to the <strong>Final Stretch</strong> section ensure your list contains the following:</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/4.png" alt="" width="504" height="150" /></p>
<p><strong style="font-size: 16px;"><br />
Final Stretch &#8211; XSLT filtering in SharePoint Designer 2007</strong></p>
<p>An XSLT filter is used to display only current month birthdays.  The XSLT expression uses the hidden <strong>Month</strong> column to compare the <strong>Birthday Month</strong> column to [Today’s] month.</p>
<p><strong>NOTE</strong>: In SharePoint 2007 a list must be converted to a data view web part, while in SharePoint 2010 <em>all</em> lists are data view web parts. Due to this difference, the below screenshots taken from 2007 will differ from 2010; the general process for creating XSLT filters is the same.</p>
<p>4.  Open SharePoint Designer.  Navigate to the Birthdays list and <strong>double-click</strong> the <strong>currentbirthdays.aspx</strong> page to open it.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/5.png" alt="" width="224" height="145" /></p>
<p>5.  <strong>Right-click</strong> and convert the list to an <strong>XSLT Data View</strong>.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/6.png" alt="" width="205" height="141" /></p>
<p>6.  <strong>Right-click</strong> the data view web part and choose <strong>Show Common Control Tasks</strong>.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/7.png" alt="" width="269" height="155" /></p>
<p>7.  Choose <strong>Filter</strong>.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/8.png" alt="" width="291" height="122" /></p>
<p>8.  Check the <strong>Add the XSLT Filtering</strong> option and choose <strong>Edit</strong>.  The <strong>Advanced Condition</strong> dialogue box opens.</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/9.png" alt="" width="330" height="230" /></p>
<p>9.  In the <strong>Edit the XPath Expression</strong> field input the following XSLT and then click OK:<br />
[@Month=number(ddwrt:FormatDateTime(string(ddwrt:Today()),1033,'MM'))]</p>
<p><img src="http://blog.metrostarsystems.com/wp-content/uploads/2011/09/10.png" alt="" width="484" height="367" /></p>
<p>10.  Select <strong>Ok</strong> to close the <strong>Advanced Condition</strong> dialogue box.</p>
<p>11.  Close Designer.  If prompted to Save or Check-in, do so.</p>
<p><strong>NOTE:</strong>  After adding the list as a web part to a page or site, it <em>may be necessary</em> to repeat steps 4 – 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/09/30/display-this-month-birthdays-in-a-sharepoint-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading SharePoint 2007 Visual Studio Projects</title>
		<link>http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/</link>
		<comments>http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 16:13:12 +0000</pubDate>
		<dc:creator>Johnny Bouder</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[importing]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SP2007]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[upgrading]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[Visual Studio Projects]]></category>
		<category><![CDATA[VSeWSS]]></category>
		<category><![CDATA[VSeWSS Import Tool]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4988</guid>
		<description><![CDATA[This blog post will outline the steps required to upgrade a <strong>SharePoint 2007 Visual Studio Project</strong> to a <strong>SharePoint 2010 Visual Studio Project</strong> using the <strong>VSeWSS Import Tool </strong>for Visual Studio 2010 (<a href="http://archive.msdn.microsoft.com/VSeWSSImport">http://archive.msdn.microsoft.com/VSeWSSImport</a>). The tool is kind of old at this point, but it is still very useful and I haven’t found a better tool.

This post will be helpful to you if you have created custom SharePoint 2007 solutions using the VSeWSS Visual Studio extensions. The tool above can be used to easily upgrade these projects to SharePoint 2010 projects. This post should be especially useful if you are upgrading existing SharePoint 2007 sites to SharePoint 2010 that already have these Web Parts added and you would like the ability to add additional modifications to these projects.

<strong>Installing the VSeWSS Import Tool</strong>

The VSeWSS tool is actually provided as a Visual Studio Project, which needs to be compiled in order to build the executable to install the tool into Visual Studio. One other thing to note is that in order to open the solution in Visual Studio 2010, you need to install the Visual Studio 2010 SDK (<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&#38;displaylang=en">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&#38;displaylang=en</a>). Why this isn’t included in Visual Studio by default is beyond me. Or why it is not mentioned in the VSeWSS Import Tool installation instruction is also beyond me.

So basically, install the SDK, and then follow the instructions to install the new project type.

<strong>Importing Your Projects</strong>

<strong> </strong>

To get started you want to copy any old Visual Studio project directories over to computer where you will be writing your Visual Studio 2010 solutions.

Once you have your old projects ready and have everything installed go ahead and fire up Visual Studio 2010. Click New Project and you will now have a new project template called <em>Import VSeVSS Project</em> (if the installation went well). See below:
<p style="text-align: center;"><a rel="attachment wp-att-4990" href="http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/new_project/"><img class="aligncenter size-full wp-image-4990" title="Screen shot of 'New Project' window, project template Import VSeVSS Project" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/06/new_project.png" alt="Screen shot of 'New Project' window, project template Import VSeVSS Project" width="573" height="395" /></a></p>]]></description>
			<content:encoded><![CDATA[<p>This blog post will outline the steps required to upgrade a <strong>SharePoint 2007 Visual Studio Project</strong> to a <strong>SharePoint 2010 Visual Studio Project</strong> using the <strong>VSeWSS Import Tool </strong>for Visual Studio 2010 (<a href="http://archive.msdn.microsoft.com/VSeWSSImport">http://archive.msdn.microsoft.com/VSeWSSImport</a>). The tool is kind of old at this point, but it is still very useful and I haven’t found a better tool.</p>
<p>This post will be helpful to you if you have created custom SharePoint 2007 solutions using the VSeWSS Visual Studio extensions. The tool above can be used to easily upgrade these projects to SharePoint 2010 projects. This post should be especially useful if you are upgrading existing SharePoint 2007 sites to SharePoint 2010 that already have these Web Parts added and you would like the ability to add additional modifications to these projects.</p>
<p><strong>Installing the VSeWSS Import Tool</strong></p>
<p>The VSeWSS tool is actually provided as a Visual Studio Project, which needs to be compiled in order to build the executable to install the tool into Visual Studio. One other thing to note is that in order to open the solution in Visual Studio 2010, you need to install the Visual Studio 2010 SDK (<a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en">http://www.microsoft.com/downloads/en/details.aspx?FamilyID=47305cf4-2bea-43c0-91cd-1b853602dcc5&amp;displaylang=en</a>). Why this isn’t included in Visual Studio by default is beyond me. Or why it is not mentioned in the VSeWSS Import Tool installation instructions is also beyond me.</p>
<p>So basically, install the SDK, and then follow the instructions to install the new project type.</p>
<p><strong>Importing Your Projects</strong></p>
<p><strong> </strong></p>
<p>To get started you want to copy any old Visual Studio project directories over to computer where you will be writing your Visual Studio 2010 solutions.</p>
<p>Once you have your old projects ready and have everything installed go ahead and fire up Visual Studio 2010. Click New Project and you will now have a new project template called <em>Import VSeVSS Project</em> (if the installation went well). See below:</p>
<p style="text-align: center;"><a rel="attachment wp-att-4990" href="http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/new_project/"><img class="aligncenter size-full wp-image-4990" title="Screen shot of 'New Project' window, project template Import VSeVSS Project" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/06/new_project.png" alt="Screen shot of 'New Project' window, project template Import VSeVSS Project" width="573" height="395" /></a></p>
<p>Next, name your new projects exactly like they are in the old solutions in order to ensure your solutions upgrade correctly. Once you have named the project click the &#8220;<em>OK</em>&#8221; button. You should see the import dialog like this:</p>
<p style="text-align: center;"><a rel="attachment wp-att-4992" href="http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/upgrade_wizard/"><img class="aligncenter size-full wp-image-4992" title="Screen shot of VSeWSS upgrade tool extension wizard window, project template Import VSeVSS Project" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/06/upgrade_wizard.png" alt="Screen shot of VSeWSS upgrade tool extension wizard window, project template Import VSeVSS Project" width="495" height="393" /></a></p>
<p>In the dialog, set a debug URL if needed, and change the trust level to <em>full-trust</em>. Next, click the &#8220;<em>Browse</em>&#8221; button and browse to one of your old projects. Select the &#8220;<em>Project configuration</em>&#8221; file and click &#8220;<em>Open</em>&#8220;. Finally, click &#8220;<em>Finish</em>&#8220;.</p>
<p>The tool will then go through and upgrade the files to reflect the new layout of a SharePoint 2010 Visual Studio solution. Once the upgrade is complete, if there were no errors, you should see the new project laid out in the <em>Solution Explorer</em>. If you have not created any SharePoint 2010 solutions you will notice that the solutions are organized in a much more intuitive fashion (in my opinion at least). If you are upgrading something that deploys as a feature (like a Web Part) you will notice a <em>Feature folder</em> as well as the <em>Package folder</em>. Your solution explorer should look something like this:</p>
<p><a rel="attachment wp-att-4991" href="http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/solution_explorer/"><img class="aligncenter size-full wp-image-4991" title="Screen shot of Solution Explorer, project template Import VSeVSS Project" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/06/solution_explorer.png" alt="Screen shot of Solution Explorer, project template Import VSeVSS Project" width="297" height="393" /></a></p>
<p>So that officially upgrades your solution! Technically you should be able to just run the deployment inside Visual Studio and deploy your solution as is, however I have found this to not always be the case.</p>
<p><strong>Final Updates and Fixes</strong></p>
<p>Below you will find a list of items that I make it a habit of checking before I consider the project officially upgraded. You may or may not need to make these changes. Hopefully these will save you some time as I spent about a week figuring most of these out on my own.</p>
<ol>
<li><strong>Update Feature Title, Description, and Scope</strong> – for some reason when I upgraded some of my Web Parts the feature title and description did not get carried over. To update these expand the Features folder and double click on the item(s) within. Then just fill in the boxes. Also, my Scope was changed to <em>Web</em> for many of my features that were originally set to <em>Site</em>. Just change that in the drop down.</li>
<li><strong>Update the Deployment Path</strong> (this one is just me being a little bit retentive) – By default the feature will be deployed to the Feature directory in the form of <em><strong>&lt;NAMESPACE_FEATURE&gt;</strong></em>. For me the feature part was unnecessary so to remove this, while updating the section above you will see a property called <strong><em>Deployment Path</em></strong> in the Properties window. In this property you will see something like <em>$SharePoint.Project.FileNameWithoutExtension$_$SharePoint.Feature.FileNameWithoutExtension$</em>. You want to remove <em>$_$SharePoint.Feature.FileNameWithoutExtension$</em>.</li>
<li><strong>Add SafeControl entry to spdata file</strong> (if your project is a Web Part you may need to make this change) – The spdata file specifies the contents and behavior of a SharePoint project item. In order to see this file, click the <em>&#8220;Show All Files&#8221;</em> button at the top of the Solution Explorer. You should see the spdata file within your individual project directory. In the file paste the following below the<em> Files element</em> (replace the placeholders):<br />
<blockquote><p>&lt;SafeControls&gt;</p>
<p>&lt;SafeControl Name=”SafeControlEntry1” Assembly=”$SharePoint.Project.AssemblyFullName$” Namespace=”&lt;NAMESPACE&gt;”</p>
<p>TypeName=”&lt;TYPENAME&gt;” IsSafe=”True” IsSafeAgainstScript=”False” /&gt;</p>
<p>&lt;/SafeControls&gt;</p></blockquote>
</li>
<li><strong>Update Elements.xml</strong> – My <em>elements.xml</em> (actually not  named <em>elements.xml</em> in my case) file is actually the file which caused me  the most grief. For things like Web Parts, this file is what is used to  specify what happens when the feature is enabled. For some reason when I  would try to add a Web Part after enabling the feature I would get the  following error:</li>
</ol>
<p><a rel="attachment wp-att-4989" href="http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/add_web_part_error/"><img class="aligncenter size-full wp-image-4989" title="add_web_part_error" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/06/add_web_part_error.png" alt="Screen shot of Error message from webpage window" width="372" height="146" /></a></p>
<p>It turned out that the Web Part was actually being added to a folder within the Web Part catalog, which is why the error notes a directory. I’m not sure if this has something to do with differences in SharePoint 2007/SharePoint 2010 Web Parts or if it was an issue in the upgrade, but either way it needed to be fixed for every one of my Web Parts that are added as features.</p>
<p>To fix this issue, remove the directory part of the URL in the Url property of the Elements.xml file. More specifically within the File xml element you will see a Path and a Url. If within the Url you see something like <em><strong>&lt;DIRECTORY\example.webpart&gt;</strong></em>, remove “<em><strong>Directory\.</strong></em>” This one drove me crazy because when I enabled the feature a file was getting added to the Web Part Gallery, but it wasn’t an XML file. It actually came down to me writing a PowerShell script to determine what exactly the file was.</p>
<p>Two more things that are probably just for good measure are to add “<strong><em>Type=GhostableInLibrary</em></strong>” to the File element and to specify a value for a group. Here is what mine looked like after everything was updated:</p>
<p style="padding-left: 60px;">&lt;?xml version=”1.0” encoding=”utf-8”?&gt;</p>
<p style="padding-left: 60px;">&lt;Elements Id=”&lt;ID&gt;” xmlns=”http://schema.microsoft.com/sharepoint/”&gt;</p>
<p style="padding-left: 60px;">&lt;Module Name=”Test” List=”113” Url=”_catalogs/wp”&gt;</p>
<p style="padding-left: 60px;">&lt;File Path=”Test\Test.webpart” Url=”Test.webpart” Type=”GhostableInLibrary”&gt;</p>
<p style="padding-left: 60px;">&lt;Property Name=”Group” Value=”Custom” /&gt;</p>
<p style="padding-left: 60px;">&lt;/File&gt;</p>
<p style="padding-left: 60px;">&lt; /Module&gt;</p>
<p style="padding-left: 60px;">&lt;/Elements&gt;</p>
<p>I hope this post is informative and time saving for you and I hope it will allow people to deploy much cleaner solutions to their brand new SharePoint 2010 environment. As always, please leave a comment if you have any questions, additional tips on this topic, or if you have a better solution to share. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/06/22/upgrading-sharepoint-2007-visual-studio-projects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Persistent SharePoint 2010 Site Columns</title>
		<link>http://blog.metrostarsystems.com/2011/05/11/persistent-sharepoint-2010-site-columns/</link>
		<comments>http://blog.metrostarsystems.com/2011/05/11/persistent-sharepoint-2010-site-columns/#comments</comments>
		<pubDate>Wed, 11 May 2011 19:50:14 +0000</pubDate>
		<dc:creator>Chris Lincoln</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Content Types]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[Site Columns]]></category>
		<category><![CDATA[Site Content Types]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4866</guid>
		<description><![CDATA[<a title="Introduction to Site Columns (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms450825.aspx" target="_blank">Site Columns</a> and <a title="Introduction to Content Types (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms450825.aspx" target="_blank">Site Content Types</a> are a great feature of SharePoint.  They're easy to create/modify and provide granular configuration capabilities.  It's commonly known that the <em>Title</em> Site Column can't be removed from Site Content Types (or <a title="Site and List Content Types (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms463016.aspx" target="_blank">List Content Types</a>, for that matter); it's attached to the <em>Item</em> <a title="Base Content Type Hierarchy (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms452896.aspx" target="_blank">Base Content Type</a>, after all.

But did you know that there are many Site Columns that can't be removed from Site or List Content Types?
<p style="text-align: center;"><a href="https://blog.metrostarsystems.com/wp-content/uploads/2011/05/SP2010PersistentSiteColumn.jpg"><img class=" aligncenter" src="/wp-content/uploads/2011/05/SP2010PersistentSiteColumn.jpg" alt="Edited screenshot of SharePoint 2010 &#34;Change Content Type Column&#34; form" width="550" height="177" /></a></p>But did you know that there are many Site Columns that can't be removed from Site or List Content Types?]]></description>
			<content:encoded><![CDATA[<p><a title="Introduction to Site Columns (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms450825.aspx" target="_blank">Site Columns</a> and <a title="Introduction to Content Types (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms450825.aspx" target="_blank">Site Content Types</a> are a great feature of SharePoint.  They&#8217;re easy to create/modify and provide granular configuration capabilities.  It&#8217;s commonly known that the <em>Title</em> Site Column can&#8217;t be removed from Site Content Types (or <a title="Site and List Content Types (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms463016.aspx" target="_blank">List Content Types</a>, for that matter); it&#8217;s attached to the <em>Item</em> <a title="Base Content Type Hierarchy (MSDN)" href="http://msdn.microsoft.com/en-us/library/ms452896.aspx" target="_blank">Base Content Type</a>, after all.</p>
<p>But did you know that there are many Site Columns that can&#8217;t be removed from Site or List Content Types?</p>
<p style="text-align: center;"><a href="https://blog.metrostarsystems.com/wp-content/uploads/2011/05/SP2010PersistentSiteColumn.jpg"><img class=" aligncenter" src="/wp-content/uploads/2011/05/SP2010PersistentSiteColumn.jpg" alt="Edited screenshot of SharePoint 2010 &quot;Change Content Type Column&quot; form" width="550" height="177" /></a></p>
<p>Below is a list of Site Columns confirmed to be persistent on Site &amp; List Content Types in SharePoint 2010.</p>
<table style="margin-left: 20px;" width="100%">
<tbody>
<tr>
<th style="text-align: left; width: 50%;">Display Name</th>
<th style="text-align: left;">Internal Name</th>
</tr>
<tr>
<td>Active</td>
<td>RoutingEnabled</td>
</tr>
<tr>
<td>Aliases</td>
<td>RoutingAliases</td>
</tr>
<tr>
<td>Article Date</td>
<td>ArticleStartDate</td>
</tr>
<tr>
<td>Byline</td>
<td>ArticleByLine</td>
</tr>
<tr>
<td>Contact</td>
<td>PublishingContact</td>
</tr>
<tr>
<td>Contact E-Mail Address</td>
<td>PublishingContactEmail</td>
</tr>
<tr>
<td>Contact Name</td>
<td>PublishingContactName</td>
</tr>
<tr>
<td>Contact Picture</td>
<td>PublishingContactPicture</td>
</tr>
<tr>
<td>Custom Router</td>
<td>RoutingCustomRouter</td>
</tr>
<tr>
<td>Image Caption</td>
<td>PublishingImageCaption</td>
</tr>
<tr>
<td>Page Content</td>
<td>PublishingPageContent</td>
</tr>
<tr>
<td>Page Icon</td>
<td>PublishingPageIcon</td>
</tr>
<tr>
<td>Page Image</td>
<td>PublishingPageImage</td>
</tr>
<tr>
<td>Priority</td>
<td>RoutingPriority</td>
</tr>
<tr>
<td>Properties used in Conditions</td>
<td>RoutingConditionProperties</td>
</tr>
<tr>
<td>Property for Automatic Folder Creation</td>
<td>RoutingAutoFolderProp</td>
</tr>
<tr>
<td>Rollup Image</td>
<td>PublishingRollupImage</td>
</tr>
<tr>
<td>Route To External Location</td>
<td>RoutingRuleExternal</td>
</tr>
<tr>
<td>Rule Name</td>
<td>RoutingRuleName</td>
</tr>
<tr>
<td>Scheduling End Date</td>
<td>PublishingExpirationDate</td>
</tr>
<tr>
<td>Scheduling Start Date</td>
<td>PublishingStartDate</td>
</tr>
<tr>
<td>Submission Content Type</td>
<td>RoutingContentType</td>
</tr>
<tr>
<td>Summary Links</td>
<td>SummaryLinks</td>
</tr>
<tr>
<td>Summary Links 2</td>
<td>SummaryLinks2</td>
</tr>
<tr>
<td>Target Audiences</td>
<td>Audience</td>
</tr>
<tr>
<td>Target Folder</td>
<td>RoutingTargetFolder</td>
</tr>
<tr>
<td>Target Library</td>
<td>RoutingTargetLibrary</td>
</tr>
<tr>
<td>Target Path</td>
<td>RoutingTargetPath</td>
</tr>
</tbody>
</table>
<p><a title="Get-SPScripts: PowerShell Scripts for SharePoint" href="http://get-spscripts.com/" target="_blank">Get-SPScripts</a> provides <a title="Can’t remove a site column from a content type or list in SharePoint? Use PowerShell (Get-SPScripts)" href="http://get-spscripts.com/2010/10/cant-remove-site-column-from-content.html" target="_blank">some very helpful Powershell scripts</a> to remove such columns if necessary.</p>
<hr /><strong>UPDATE (11 MAY 2011)</strong></p>
<p>It appears that Site Content Types that using or having used one or more &#8220;persistent Site Columns&#8221; cannot be deleted.  A custom Site Content Type (named &#8220;Service&#8221;) was used to test behavior of these persistent Site Columns.  It could not be deleted through the SharePoint web UI due to an error stating: &#8220;The content type is in use.﻿&#8221;</p>
<p style="text-align: center;"><a href="https://blog.metrostarsystems.com/wp-content/uploads/2011/05/SharePointWebUiError.jpg"><img class="aligncenter" src="/wp-content/uploads/2011/05/SharePointWebUiError.jpg" alt="Screenshot of SharePoint web UI error stating &quot;The content type is in use.&quot;" width="500" height="223" /></a></p>
<p>To confirm Site Content Type usage, each List and Site Content Type was inspected; no objects were found to use the &#8220;Service&#8221; Site Content Type.  Using SharePoint Manager 2010, it was confirmed that the Site Content Type was not being used.</p>
<p style="text-align: center;"><a href="https://blog.metrostarsystems.com/wp-content/uploads/2011/05/SiteContentTypeUsage1.jpg"><img class="aligncenter" src="/wp-content/uploads/2011/05/SiteContentTypeUsage1.jpg" alt="Edited screenshot of SharePoint Manager 2010 window displaying usage of &quot;Service&quot; Site Content Type" width="500" height="154" /></a></p>
<p>Unfortunately, the &#8220;Service&#8221; Site Content Type could not be deleted using <a title="SharePoint Manager 2010 (CodePlex)" href="http://spm.codeplex.com/" target="_blank">SharePoint Manager 2010</a> due to an error stating: &#8220;Exception has been thrown by the target of an invocation.&#8221;  Under the suspicion that the persistent Site Columns were causing unanticipated behavior, they were removed from the &#8220;Service&#8221; Site Content Type using Get-SPScripts&#8217; PowerShell scripts through the <a title="SharePoint 2010 Products administration by using Windows PowerShell (MSDN)" href="http://technet.microsoft.com/en-us/library/ee806878.aspx#section2" target="_blank">SharePoint 2010 Management Shell</a>.  Unfortunately, the &#8220;Service&#8221; Site Content Type still could not be deleted using the SharePoint web UI, SharePoint Manager 2010, or PowerShell scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/05/11/persistent-sharepoint-2010-site-columns/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010: Query String Mayhem</title>
		<link>http://blog.metrostarsystems.com/2011/05/09/sharepoint-2010-query-string-mayhem/</link>
		<comments>http://blog.metrostarsystems.com/2011/05/09/sharepoint-2010-query-string-mayhem/#comments</comments>
		<pubDate>Mon, 09 May 2011 14:30:08 +0000</pubDate>
		<dc:creator>Chris Lincoln</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[LFWP]]></category>
		<category><![CDATA[List Item ID]]></category>
		<category><![CDATA[LVWP]]></category>
		<category><![CDATA[query string]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SP2010]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4819</guid>
		<description><![CDATA[Do you have a customized SharePoint page that uses the query string variable "ID" to identify a List Item by its ID value? Did SharePoint throw an error that "no item exists at" that location? Are you certain it exists?
<p style="text-align: center;"><a href="http://blog.metrostarsystems.com/wp-content/uploads/2011/05/blogpost-sharepoint2010-query-string-mayhem.jpg"><img class="aligncenter size-full wp-image-4857" title="blogpost-sharepoint2010-query-string-mayhem" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/05/blogpost-sharepoint2010-query-string-mayhem.jpg" alt="Sample SharePoint &#34;no item exists&#34; error message" width="500" height="232" /></a></p>
If you answered "yes" to each of the above questions, switch your query string variable name from "ID" to something -anything- else.

SharePoint 2010 apparently reserves "ID" for peculiar usage and therefore cannot be used as freely as with SharePoint 2007.]]></description>
			<content:encoded><![CDATA[<p>Do you have a customized SharePoint page that uses the query string variable &#8220;ID&#8221; to identify a List Item by its ID value? Did SharePoint throw an error that &#8220;no item exists at&#8221; that location? Are you certain it exists?</p>
<p style="text-align: center;"><a href="http://blog.metrostarsystems.com/wp-content/uploads/2011/05/blogpost-sharepoint2010-query-string-mayhem.jpg"><img class="aligncenter size-full wp-image-4857" title="blogpost-sharepoint2010-query-string-mayhem" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/05/blogpost-sharepoint2010-query-string-mayhem.jpg" alt="Sample SharePoint &quot;no item exists&quot; error message" width="500" height="232" /></a></p>
<p>If you answered &#8220;yes&#8221; to each of the above questions, switch your query string variable name from &#8220;ID&#8221; to something -anything- else.</p>
<p>SharePoint 2010 apparently reserves &#8220;ID&#8221; for peculiar usage and therefore cannot be used as freely as with SharePoint 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/05/09/sharepoint-2010-query-string-mayhem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint 2007 Workflow Status Codes</title>
		<link>http://blog.metrostarsystems.com/2011/05/03/sharepoint-2007-workflow-status-codes/</link>
		<comments>http://blog.metrostarsystems.com/2011/05/03/sharepoint-2007-workflow-status-codes/#comments</comments>
		<pubDate>Tue, 03 May 2011 13:30:03 +0000</pubDate>
		<dc:creator>Chris Lincoln</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SP2007]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4772</guid>
		<description><![CDATA[By default, SharePoint 2007 creates a new column within a List when an attached workflow is started for the first time.  The displayed column value is a verbose workflow status (e.g. "In Progress", "Error Occurred", etc.).  However, if List Items are retrieved from a List View containing such a "workflow column" using the Lists Web Service, the returned values of any workflow columns are not verbose. In fact, they're the opposite...]]></description>
			<content:encoded><![CDATA[<p>By default, SharePoint 2007 creates a new column within a List when an attached workflow is started for the first time (<a title="Introduction to workflows (Microsoft Office)" href="http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-workflows-HA010100587.aspx#BM5" target="_blank">more information</a>).  The displayed column value is a verbose workflow status (e.g. &#8220;In Progress&#8221;, &#8220;Error Occurred&#8221;, etc.).  However, if List Items are retrieved from a List View containing such a &#8220;workflow column&#8221; using the <a title="Lists Web Service (MSDN)" href="http://msdn.microsoft.com/en-us/library/lists(v=office.12).aspx" target="_blank">Lists Web Service</a>, the returned values of any workflow columns are not verbose. In fact, they&#8217;re the opposite; workflow status values are integers (e.g. &#8220;2&#8243;, &#8220;3&#8243;, etc.).  Therefore, response XML may contain something like: <span style="font-family: 'Courier New', Courier, mono">&lt;z:row ows_ID=&#8221;1&#8243; ows_WorkflowInternalName=&#8221;2&#8243; &#8230; /&gt;</span>.</p>
<p><em><a title="Double Rainbow (YouTube)" href="http://www.youtube.com/watch?v=OQSNhk5ICTI&amp;feature=player_detailpage#t=75s" target="_blank">What does this mean</a>??</em> It means translation is necessary.</p>
<p>Here&#8217;s an incomplete Rosetta Stone:</p>
<table style="margin-left:20px">
<tbody>
<tr>
<th width="100px" align="left">Status Code</th>
<th>Status Description</th>
</tr>
<tr>
<td>0</td>
<td>Not Started</td>
</tr>
<tr>
<td>1</td>
<td>Failed on Start</td>
</tr>
<tr>
<td>2</td>
<td>In Progress</td>
</tr>
<tr>
<td>3</td>
<td>Error Occurred</td>
</tr>
<tr>
<td>4</td>
<td>Cancelled</td>
</tr>
<tr>
<td>5</td>
<td>Completed</td>
</tr>
<tr>
<td>6</td>
<td>Failed on Start (retrying)</td>
</tr>
<tr>
<td>7</td>
<td>Error Occurred (retrying)</td>
</tr>
<tr style="color: #999999">
<td>8</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>9</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>10</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>11</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>12</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>13</td>
<td>(unknown)</td>
</tr>
<tr style="color: #999999">
<td>14</td>
<td>(unknown)</td>
</tr>
<tr>
<td>15</td>
<td>Cancelled</td>
</tr>
<tr>
<td>16</td>
<td>Approved</td>
</tr>
<tr>
<td>17</td>
<td>Rejected</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/05/03/sharepoint-2007-workflow-status-codes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Leveraging SharePoint 2007 through Windows PowerShell</title>
		<link>http://blog.metrostarsystems.com/2011/04/20/leveraging-sharepoint-2007-through-windows-powershell/</link>
		<comments>http://blog.metrostarsystems.com/2011/04/20/leveraging-sharepoint-2007-through-windows-powershell/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 15:17:21 +0000</pubDate>
		<dc:creator>Johnny Bouder</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[SharePoint 2007]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4711</guid>
		<description><![CDATA[For all of you out there that have not yet been allowed the opportunity to dig into the vastness that is SharePoint 2010 and have become bored with SharePoint 2007, I just might have something new for you to play with. That’s right…<a href="http://en.wikipedia.org/wiki/Windows_PowerShell" target="_blank">PowerShell</a>! My new addiction…

Note that before getting started, you should have a good working knowledge of the <a href="http://msdn.microsoft.com/en-us/library/ms473633.aspx" target="_blank">SharePoint Object Model</a>.

<strong>Step 1: Get started</strong>

PowerShell by default comes with Windows Server 2008, however it doesn’t come with Windows Server 2003 and my guess is that if you’re still running SharePoint 2007 you’re probably still running Server 2003. If you are among this group, all you need to do is install the hotfix (<a href="http://support.microsoft.com/kb/926139" target="_blank">KB926139</a>) on one of your web servers. If you’re running Server 2008, you’re ready to go.

<strong>Step 2: Get excited!</strong>

So without getting too deeply into the nuts and bolts of PowerShell, what you need to know is that it gives you a command line interface, which provides the added ability of leveraging compiled code without actually compiling any of your own code. How could anyone not be excited about that?

And given the richness of the SharePoint object model, you are basically given unlimited potential for managing your SharePoint applications...]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.metrostarsystems.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p>For all of you out there that have not yet been allowed the opportunity to dig into the vastness that is SharePoint 2010 and have become bored with SharePoint 2007, I just might have something new for you to play with. That’s right…<a href="http://en.wikipedia.org/wiki/Windows_PowerShell" target="_blank">PowerShell</a>! My new addiction…</p>
<p>Note that before getting started, you should have a good working knowledge of the <a href="http://msdn.microsoft.com/en-us/library/ms473633.aspx" target="_blank">SharePoint Object Model</a>.</p>
<p><strong>Step 1: Get started</strong></p>
<p>PowerShell by default comes with Windows Server 2008, however it doesn’t come with Windows Server 2003 and my guess is that if you’re still running SharePoint 2007 you’re probably still running Server 2003. If you are among this group, all you need to do is install the hotfix (<a href="http://support.microsoft.com/kb/926139" target="_blank">KB926139</a>) on one of your web servers. If you’re running Server 2008, you’re ready to go.</p>
<p><strong>Step 2: Get excited!</strong></p>
<p>So without getting too deeply into the nuts and bolts of PowerShell, what you need to know is that it gives you a command line interface, which provides the added ability of leveraging compiled code without actually compiling any of your own code. How could anyone not be excited about that?</p>
<p>And given the richness of the SharePoint object model, you are basically given unlimited potential for managing your SharePoint applications.</p>
<p><strong>Step 3: Get to Work</strong></p>
<p>Go ahead and fire up PowerShell. Also start up your favorite text editor program because we will write a few simple scripts. In these scripts we will do a few things: specify command line arguments, load any required libraries, and write some code to run the program.</p>
<p>Within your text editor paste the following:<br />
<pre class="brush: csharp">param([string] $url)

[System.Reflection.Assembly]::Load('Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c') | Out-Null

$site = new-object Microsoft.SharePoint.SPSite($url)
$site
$site.Dispose()
</pre><br />
Save this file as <strong><em>Get-SPSiteInfo.ps1</em></strong> in the current PowerShell directory (or anywhere else if you have no problem navigating through directories in the command line).</p>
<p>If you look at the above code you will notice the 3 things I mentioned earlier. The param section which specifies that we will accept a parameter named “<em>url</em>” which is of type string. The next section specifies which assemblies should be loaded. We are loading in the “<em>Microsoft.SharePoint</em>” assembly, which is generally all you will need for these kinds of scripts. Also note in this section the “<em>| Out-Null</em>” command. This just basically suppresses PowerShell from outputting whether or not the assembly was successfully loaded. Finally, the last section is where we are running our code. We are just creating an SPSite object from the passed in URL, displaying the contents of the SPSite object, and finally disposing of it (never forget to dispose of objects when needed).</p>
<p>Now go back to your PowerShell window and type the following (replace <strong><em>&lt;SITE URL&gt;</em></strong> with the URL of your SharePoint site) and hit enter:</p>
<p>If the command runs correctly your output should look like the following screenshot (<em>Click image to enlarge</em>; if you receive an error stating something about an execution policy see this link <a href="http://technet.microsoft.com/en-us/library/ee176961.aspx" target="_blank">http://technet.microsoft.com/en-us/library/ee176961.aspx</a>):</p>
<p style="text-align: center;">
<div id="attachment_4723" class="wp-caption aligncenter" style="width: 542px"><a rel="attachment wp-att-4723" href="http://blog.metrostarsystems.com/2011/04/20/leveraging-sharepoint-2007-through-windows-powershell/get-spsiteinfo/"><img class="size-full wp-image-4723      " title="get-spsiteinfo" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/04/get-spsiteinfo.png" alt="Screenshot of 'get-spsiteinfo' code" width="532" height="341" /></a><p class="wp-caption-text"> </p></div>
<p>What you are seeing are all of the properties, methods, objects, etc of the $site (SPSite) object. You can actually do this with any objects that you create in PowerShell. By just entering $site on its own line, you are telling PowerShell to output the contents of that object. This is usually where I start when I write scripts so that I can find all of the elements that I need.</p>
<p>So to recap, what we did was wrote a script that: 1) accepts a URL parameter; 2) loads the SharePoint library; 3) creates an SPSite object based on the passed in URL; 4) displays its contents; and finally 5) disposes of it. Very simple right?</p>
<p><strong>Step 4: Get Something Useful</strong></p>
<p>I don’t know about you, but on numerous occasions I’ve been asked to provide a list of all inactive sites in my environment. Now you can do things like set policies to delete sites that are inactive automatically, but sometimes that isn’t the best way to go about it. So if you’re in that boat, how do you get this information? You could always write a SQL script to query the databases, but why do that if you don’t need to? How about we make use of the SharePoint Usage data?</p>
<p>So for this example, our script will provide us with a list of all top-level sites in a specified web application that have not been accessed within the past month. Additionally this script will provide us with the ability to specify users to not count, as well as provide the ability to export to CSV. Open up a new text editor window and paste the following:</p>
<p><pre class="brush: csharp">param($url, [string[]] $users, [switch]$exportToCSV)
[System.Reflection.Assembly]::Load('Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c') | Out-Null

# Lookup Web Application as specified in the command line parameter
$wa = [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($url) 

# Create an array to store a list of all inactive sites
$sites =@()

Write-Output(&quot;`nProcessing sites...`n&quot;)

# Loop through all site collections in the web application
foreach($site in $wa.Sites)
{
	$siteCount = $wa.sites.Count	
	# Counter used to track number of active users
	$counter = 0

	# Create a DataTable, which contains the user usage data for the past month
	$usage = $site.RootWeb.GetUsageData([Microsoft.SharePoint.Administration.SPUsageReportType]::user, [Microsoft.SharePoint.Administration.SPUsagePeriodType]::lastMonth)

	# Loop through all rows in the DataTable
	foreach ($row in $usage.Rows)
	{
# If the array of users to not count does not contain the current user, the user is unique, which means that the site is active, so increase the counter
		if ($users -notcontains $row.User)
		{
			$counter++
		}            
	}

	# If the counter is equal to zero, then no unique users were found, and the site is considered inactive
	if ($counter -eq 0)
	{
		# Create a generic object containing the site information and add it to the array
		$o = new-object psobject
		$o | Add-Member -MemberType noteproperty -Name Name -value $site.RootWeb.Title
		$o | Add-Member -MemberType noteproperty -Name Url -value $site.RootWeb.Url
		$sites += $o
 
		# Outputs any inactive sites that are found
		Write-Output(&quot;Site Processed: {0} (Inactive)&quot; -f $site.RootWeb.Title)
	}

	else
	{
		# Outputs any active sites that are found
		Write-Output(&quot;Site Processed: {0} (Active)&quot; -f $site.RootWeb.Title)
	}

	# Dispose of the SPSite object
	$site.Dispose()
}

# If the exportToCSV switch is entered, output the array of sites to CSV (without file type information)
if ($exportToCSV)
{
	$sites | export-csv &quot;Inactive_Sites.csv&quot; -noTypeInformation
}

# else output the array of sites to the screen in a formatted list
else
{
	$sites | format-list
}

#Output stats
Write-Output(&quot;`nTotal Sites Processed: {0}&quot; -f $siteCount)
Write-Output(&quot;Total Inactive Sites: {0}&quot; -f $sites.Count)
Write-Output(&quot;Processing complete`n&quot;)
</pre></p>
<p>Save this file as <strong><em>Get-InactiveSites.ps1</em></strong></p>
<p>Now go back to your PowerShell window and type the following (replace <strong><em>&lt;SITE URL&gt;</em></strong> with the URL of your SharePoint site) and hit enter:</p>
<p style="padding-left: 30px;"><em><strong>./Get-InactiveSites -url &lt;SITE URL&gt; -exportToCSV</strong></em></p>
<p>If the command runs correctly your output should look like the following screenshot (<em>Click image to enlarge</em>):</p>
<p style="text-align: left;">
<p style="text-align: center;"><a rel="attachment wp-att-4734" href="http://blog.metrostarsystems.com/2011/04/20/leveraging-sharepoint-2007-through-windows-powershell/get-inactivesites/"><img class="size-full wp-image-4734   aligncenter" title="get-inactivesites" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/04/get-inactivesites.png" alt="'Get-InactiveSites' code" width="534" height="341" /></a></p>
<p>Hopefully the comments explain everything that is going on here. And just be aware that this does cycle all site collections in your web application, so if you have a huge number of site collections, it may take a while to run. The only real thing to note is the <em>–exportToCSV</em> switch, which instead of outputting the results to the screen, they are outputted to a CSV. Awesome!</p>
<p>Let me know if you have any questions or comments below in the comments section.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/04/20/leveraging-sharepoint-2007-through-windows-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paging within list views in SharePoint 2010 using SPListItemCollectionPosition</title>
		<link>http://blog.metrostarsystems.com/2011/03/16/paging-within-list-views-in-sharepoint-2010-using-splistitemcollectionposition/</link>
		<comments>http://blog.metrostarsystems.com/2011/03/16/paging-within-list-views-in-sharepoint-2010-using-splistitemcollectionposition/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 20:51:51 +0000</pubDate>
		<dc:creator>Lee Kohn</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[Filter]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Next]]></category>
		<category><![CDATA[Pagination]]></category>
		<category><![CDATA[Paging]]></category>
		<category><![CDATA[Previous]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sort]]></category>
		<category><![CDATA[SPListItemCollectionPosition]]></category>
		<category><![CDATA[View]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4616</guid>
		<description><![CDATA[If you ever have had the need to create your own pagination for SharePoint 2010 lists/views you will undoubtedly have run into a class called SPListItemCollectionPosition which is supposed to handle going forwards and backwards in the paging.  Unfortunately as of this post the documentation on this little gem is non-existent.  So after doing some googling and experimentation<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>If you ever have had the need to create your own pagination for SharePoint 2010 lists/views you will undoubtedly have run into a class called SPListItemCollectionPosition which is supposed to handle going forwards and backwards in the paging.  Unfortunately as of this post the documentation on this little gem is non-existent.  So after doing some googling and experimentation here are some things I have learned which can hopefully save some of you some time trying to figure this stuff out.</p>
<ul>
<li>All of the data this class encapsulates is really stored in a string with various parameters encoded like a query string</li>
<li>The parameters which you need to concerned with are:
<ul>
<li><strong>Paged=True</strong> This parameter tells SharePoint that you&#8217;re trying to paginate the data</li>
<li>﻿<strong>p_ID </strong>Is used in two different ways
<ul>
<li>When paging <em>forward </em>this should equal the ID of the <em>last </em>item on the current page</li>
<li>When paging <em>backward</em> this should equal the ID of the <em>first </em>item on the page</li>
</ul>
</li>
<li><strong>PagedPrev </strong>should be se to TRUE when paging backwards
<ul>
<li>Can be omitted when paging forwards</li>
</ul>
</li>
<li><strong>p_</strong>[ColumnName] When using sorting this functions in the same way the p_ID field works except the value should come from the column being sorted on, not the ID of the item.
<ul>
<li>[ColumnName] is replaced with the name of the column being sorted on</li>
<li>EX) If your sorting on the Title column the parameter should be called p_Title
<ul>
<li>If paging <em>forward </em>it should be set equal to the Title value of the <em>last</em> item on the page</li>
<li>If paging <em>backward </em>it should be set equal to the Title of the <em>first </em>item on the page</li>
</ul>
</li>
</ul>
</li>
<li><strong>PageLastRow </strong>is used when paging backwards.  It should be set to the index of the last item on the current page</li>
<li><strong>PageFirstRow </strong>is used when paging forwards.  It should be set to the ID the first item on the current page</li>
</ul>
</li>
</ul>
<p>If you&#8217;re looking for more information on how this works one good place to look is in the query string for the out of the box list views.  As you sort and page through the data you&#8217;ll see these parameters in the query string of the page which provides a nice place to do some experimentation.  Also please note a few gotchas which I encountered while working with this:</p>
<ul>
<li>If sorting is being done on a DateTime column then the value for the p_[ColumnName] attribute needs to be in <strong>UTC </strong>not local time</li>
<li>The API only allows for going from the current page to the next or previous page.  You can&#8217;t jump arbitrarily between pages</li>
<li>If filtering is being done on the view then there is no real &#8216;good&#8217; way to determine if you are at the beginning or end of the pagination.  This is something you&#8217;ll have to figure out how to handle on your own</li>
</ul>
<p>For more information take a look at the following links which helped me out a lot:</p>
<ul>
<li><a href="http://charliedigital.com/2010/02/05/paging-with-splistitemcollectionposition/">http://charliedigital.com/2010/02/05/paging-with-splistitemcollectionposition/</a></li>
<li><a href="http://blogs.msdn.com/b/colbyafrica/archive/2009/02/19/learning-sharepoint-part-vi-list-pagination.aspx">http://blogs.msdn.com/b/colbyafrica/archive/2009/02/19/learning-sharepoint-part-vi-list-pagination.aspx</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/03/16/paging-within-list-views-in-sharepoint-2010-using-splistitemcollectionposition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>StarLabs</title>
		<link>http://blog.metrostarsystems.com/2011/03/04/starlabs/</link>
		<comments>http://blog.metrostarsystems.com/2011/03/04/starlabs/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 18:03:11 +0000</pubDate>
		<dc:creator>Monica Huie</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Our Culture]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[MetroStar Systems]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[StarLabs]]></category>
		<category><![CDATA[visual search]]></category>
		<category><![CDATA[Visualize It]]></category>

		<guid isPermaLink="false">http://blog.metrostarsystems.com/?p=4581</guid>
		<description><![CDATA[When I started working here at MetroStar Systems, approximately 8 months ago, one of the very first things I remember being told was, “No Idea is a bad idea”…and I have learned that mantra definitely holds true.  It’s great to be in an environment where no matter how off the wall your idea may be, it’s always taken into consideration, provided feedback and sometimes given the green light to make it happen.  While most of the daily work hours are spent getting things done for clients, many of our developers and engineers spend their after-hours coming up with tools and solutions to help enhance and improve internal processes. As all these great ideas floated around, it was only a matter of time, something was created to house them…thus, <em><strong>StarLabs</strong></em> was born.

<em><strong>StarLabs</strong></em> is where our engineers and artists collaborate and share innovative projects. It allows those unfamiliar with MetroStar Systems to learn more about the behind the scene things we do and the people who bring them to life.
<p style="text-align: center;"></p>
<p style="text-align: center;"><a href="http://labs.metrostarsystems.com/" target="_blank"><img class="size-full wp-image-4590 aligncenter" title="Starlabs_capture" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/03/Starlabs_capture2.png" alt="screenshot of StarLabs website by MetroStar Systems" width="545" height="393" /></a></p>
One of the current projects we feature on <em><strong>StarLabs</strong></em> is <a href="http://labs.metrostarsystems.com/projects/visualizeit/" target="_blank"><strong><em>Visualize It</em></strong></a>, which provides a rich user experience for navigating and exploring SharePoint Libraries. It is a powerful solution for not only finding data but also discovering data. An <a href="http://blog.metrostarsystems.com/visual-search/" target="_blank">example of how <em>Visualize It</em> works can be found on this blog</a>! See the top of the page, the little guy holding the “Visual Search” banner. Click on it and type in a keyword like “SharePoint” and watch <em>Visualize It</em> in action.

Currently, <em>Visualize It</em>, is available for free download. System administrators can download it and implement it to their SharePoint Portals. If you test it out, please let us know your feedback!

Learn more about StarLabs and the different projects we are working on by visiting <a href="http://labs.metrostarsystems.com/">http://labs.metrostarsystems.com</a>]]></description>
			<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.metrostarsystems.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCSharp.js"></script>
<p>When I started working here at MetroStar Systems, approximately 8 months ago, one of the very first things I remember being told was, “No Idea is a bad idea”…and I have learned that mantra definitely holds true.  It’s great to be in an environment where no matter how off the wall your idea may be, it’s always taken into consideration, provided feedback and sometimes given the green light to make it happen.  While most of the daily work hours are spent getting things done for clients, many of our developers and engineers spend their after-hours coming up with tools and solutions to help enhance and improve internal processes. As all these great ideas floated around, it was only a matter of time, something was created to house them…thus, <em><strong>StarLabs</strong></em> was born.</p>
<p><em><strong>StarLabs</strong></em> is where our engineers and artists collaborate and share innovative projects. It allows those unfamiliar with MetroStar Systems to learn more about the behind the scene things we do and the people who bring them to life.</p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://labs.metrostarsystems.com/" target="_blank"><img class="size-full wp-image-4590 aligncenter" title="Starlabs_capture" src="http://blog.metrostarsystems.com/wp-content/uploads/2011/03/Starlabs_capture2.png" alt="screenshot of StarLabs website by MetroStar Systems" width="545" height="393" /></a></p>
<p>One of the current projects we feature on <em><strong>StarLabs</strong></em> is <a href="http://labs.metrostarsystems.com/projects/visualizeit/" target="_blank"><strong><em>Visualize It</em></strong></a>, which provides a rich user experience for navigating and exploring SharePoint Libraries. It is a powerful solution for not only finding data but also discovering data. An <a href="http://blog.metrostarsystems.com/visual-search/" target="_blank">example of how <em>Visualize It</em> works can be found on this blog</a>! See the top of the page, the little guy holding the “Visual Search” banner. Click on it and type in a keyword like “SharePoint” and watch <em>Visualize It</em> in action.</p>
<p>Currently, <em>Visualize It</em>, is available for free download. System administrators can download it and implement it to their SharePoint Portals. If you test it out, please let us know your feedback!</p>
<p>Learn more about StarLabs and the different projects we are working on by visiting <a href="http://labs.metrostarsystems.com/">http://labs.metrostarsystems.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.metrostarsystems.com/2011/03/04/starlabs/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

