<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:series="http://organizeseries.com/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Marc D Anderson's Blog</title>
	
	<link>http://sympmarc.com</link>
	<description>A Knowledge Management Zealot Speaks Out</description>
	<lastBuildDate>Wed, 22 May 2013 03:20:46 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MarcDAndersonsBlog" /><feedburner:info uri="marcdandersonsblog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://sympmarc.com/?pushpress=hub" /><geo:lat>42.324397</geo:lat><geo:long>-71.139331</geo:long><feedburner:emailServiceId>MarcDAndersonsBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/MarcDAndersonsBlog" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.addtoany.com/?linkname=Marc%20D%20Anderson%27s%20Blog&amp;linkurl=http%3A%2F%2Ffeeds.feedburner.com%2FMarcDAndersonsBlog&amp;type=feed" src="http://www.addtoany.com/addfr-b.gif">Add to Any Feed Reader</feedburner:feedFlare><feedburner:browserFriendly>Thanks for subscribing to my blog. I hope you find some things useful. Let me know how I'm doing -- leave me a comment (or two).</feedburner:browserFriendly><item>
		<title>Turn Off "Smart Quotes" in PowerPoint 2013</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/E1fr1Kn2w1U/</link>
		<comments>http://sympmarc.com/2013/05/21/turn-off-smart-quotes-in-powerpoint-2013/#comments</comments>
		<pubDate>Wed, 22 May 2013 03:18:43 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Microsoft Office 2013]]></category>
		<category><![CDATA[PowerPoint]]></category>
		<category><![CDATA[smart quotes]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=17018</guid>
		<description><![CDATA[There are so many times when software is designed to do &#8220;smart&#8221; things for you. In many cases, those things aren&#8217;t as smart as they seem in actual practice. Here&#8217;s an example of something that really gets in my way. Microsoft Office loves to convert &#8220;straight quotes&#8221; to &#8220;smart quotes&#8221;. If you&#8217;ve ever wondered why &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/21/turn-off-smart-quotes-in-powerpoint-2013/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>There are so many times when software is designed to do &#8220;smart&#8221; things for you. In many cases, those things aren&#8217;t as smart as they seem in actual practice.</p>
<p style="text-align: center;" align="center"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image4.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb4.png?resize=155%2C28" border="0" data-recalc-dims="1" /></a></p>
<p>Here&#8217;s an example of something that really gets in my way. Microsoft Office loves to convert &#8220;straight quotes&#8221; to &#8220;smart quotes&#8221;. If you&#8217;ve ever wondered why your single or double quote characters seem to curl up after you type the closing one, this is what is going on. It&#8217;s probably great if all you ever type is prose, but almost everything I type into Microsoft Word or PowerPoint has at least some code in it. When the straight quotes are converted into smart quotes, the characters are no longer valid code in almost every programming language.</p>
<p>Here&#8217;s how you can turn off this &#8220;smart&#8221; behavior in Microsoft PowerPoint 2013. (Sadly, with every new release of Office, this type of little setting seems to move to a new &#8220;undisclosed location&#8221;.)</p>
<p style="text-align: center;"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f6b789.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="SNAGHTML17f6b789" alt="SNAGHTML17f6b789" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f6b789_thumb.png?resize=253%2C166" border="0" data-recalc-dims="1" /></a></p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/image5.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb5.png?resize=148%2C174" border="0" data-recalc-dims="1" /></a></p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f85464.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="SNAGHTML17f85464" alt="SNAGHTML17f85464" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f85464_thumb.png?resize=207%2C271" border="0" data-recalc-dims="1" /></a></p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f91783.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="SNAGHTML17f91783" alt="SNAGHTML17f91783" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17f91783_thumb.png?resize=440%2C115" border="0" data-recalc-dims="1" /></a></p>
<p>Uncheck the &#8220;Straight quote&#8221; with &#8220;smart quotes&#8221; box.</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17eea994.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="SNAGHTML17eea994" alt="SNAGHTML17eea994" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/SNAGHTML17eea994_thumb.png?resize=416%2C557" border="0" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=E1fr1Kn2w1U:FcZdC6Vakv0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/E1fr1Kn2w1U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/21/turn-off-smart-quotes-in-powerpoint-2013/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/21/turn-off-smart-quotes-in-powerpoint-2013/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=turn-off-smart-quotes-in-powerpoint-2013</feedburner:origLink></item>
		<item>
		<title>SharePoint-Videos.com: JavaScript and jQuery for SharePoint 2013 Training – Online Class</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/BHlUFStKfYw/</link>
		<comments>http://sympmarc.com/2013/05/16/sharepointvideos-com-javascript-and-jquery-for-sharepoint-2013-training-online-class/#comments</comments>
		<pubDate>Thu, 16 May 2013 04:34:20 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint-Videos.com]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16994</guid>
		<description><![CDATA[Next Thursday, May 23rd, 2013, I&#8217;ll be teaching a class for SharePoint-Videos.com called &#8220;JavaScript and jQuery for SharePoint 2013&#8243;. It&#8217;s an online class that is available to everyone, but it&#8217;s filling up fast. This will be my first class fully focused on jQuery with SharePoint 2013, and I&#8217;ve had a lot of fun putting it &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/16/sharepointvideos-com-javascript-and-jquery-for-sharepoint-2013-training-online-class/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://sharepoint-videos.com"><img class="size-full wp-image-16995 alignright" alt="SharePoint-Videos.com" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/5-15-2013-23-11-47.png?resize=350%2C100" data-recalc-dims="1" /></a>Next Thursday, May 23rd, 2013, I&#8217;ll be teaching a class for SharePoint-Videos.com called &#8220;JavaScript and jQuery for SharePoint 2013&#8243;. It&#8217;s an online class that is available to everyone, but it&#8217;s filling up fast.</p>
<p>This will be my first class fully focused on jQuery with SharePoint 2013, and I&#8217;ve had a lot of fun putting it together. SharePoint 2013 is more geared for great client-side programming opportunities than prior versions. Adding these development techniques to your toolkit can really help solve business requirements and improve the SharePoint user experience.</p>
<p>Here&#8217;s the <a href="http://sharepoint-videos.com/javascript-and-jquery-for-sharepoint-2013-training-online-class/" target="_blank">registration link</a> if you&#8217;d like to join us, and the class outline is below.</p>
<p><strong>Class Outline</strong></p>
<p><strong>A jQuery Primer for SharePoint </strong></p>
<ul>
<li>Learn the important functionality of jQuery in SharePoint context</li>
<li>Find the parts of the page you need to work with using selectors</li>
<li>Traverse the Document Object Model (DOM) to act upon related elements</li>
<li>Manipulate elements to change their behavior, look, or structure</li>
<li>Bind to DOM events to add behavior and functionality</li>
<li>Use jQuery effects to add pizazz</li>
<li>Interact with the SharePoint server or other external services using AJAX</li>
<li>Improve the user experience and process by using deferred objects</li>
</ul>
<p><strong>SharePoint Client-Side Programming</strong></p>
<ul>
<li>Discuss the different client-side options: CSOM, REST, and SPServices (SOAP) and how to use each approach</li>
<li>Review examples of equivalent functionality using all three methods</li>
<li>Discover when each approach is best</li>
<li>Overview of the new App model</li>
<li>Find out when client-side programming makes sense and when it doesn’t</li>
</ul>
<p><strong>Richer UIs Using jQueryUI and Other Script-Based Plugins</strong></p>
<ul>
<li>Configurable dialogs</li>
<li>Improved calendaring</li>
<li>Drag and Drop</li>
<li>Autocomplete</li>
<li>Image Rotators</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=BHlUFStKfYw:oTO7mj5R3fA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/BHlUFStKfYw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/16/sharepointvideos-com-javascript-and-jquery-for-sharepoint-2013-training-online-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/16/sharepointvideos-com-javascript-and-jquery-for-sharepoint-2013-training-online-class/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sharepointvideos-com-javascript-and-jquery-for-sharepoint-2013-training-online-class</feedburner:origLink></item>
		<item>
		<title>SharePoint 2013′s Search Continuous Crawl: An Enigma</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/bBRwILjAmDU/</link>
		<comments>http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/#comments</comments>
		<pubDate>Mon, 13 May 2013 16:49:12 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Content Search Web Part]]></category>
		<category><![CDATA[Continuous Crawl]]></category>
		<category><![CDATA[Crawl Schedule]]></category>
		<category><![CDATA[CSWP]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16985</guid>
		<description><![CDATA[I’m doing some work in SharePoint 2013 and we want to take advantage of as many out of the box capabilities as possible. We’re replacing an existing Intranet that has grown up in SharePoint from 2007 to 2010, and we’d like to rebuild with as little custom code as possible, since SharePoint 2013 now contains features &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I’m doing some work in SharePoint 2013 and we want to take advantage of as many out of the box capabilities as possible. We’re replacing an existing Intranet that has grown up in SharePoint from 2007 to 2010, and we’d like to rebuild with as little custom code as possible, since SharePoint 2013 now contains features that had to be custom built in the past.</p>
<p>The Intranet is build using a Publishing Portal and we want to use the Content Search Web Part (CSWP) to surface content in places like a home page rotator (the latest stories of certain Content Types within relative date ranges), in several “archive pages” (a list of the historical content, sorted by descending publishing date), and using search with the Search Results Web Part (SRWP) and the Refinement Web Part (RWP) in a page. The user stories and use cases here are not really all that complex: let&#8217;s show people the latest content of predetermined types regardless where it was created in the Publishing Portal.</p>
<p>The new Continuous Crawl capability in SharePoint 20103 sounds like it will fit the bill for us. We want the content that users see to be as fresh as possible. In fact, the TechNet article I link to below says that with Continuous Crawl &#8220;[t]he search results are very fresh, because the SharePoint content is crawled frequently to keep the search index up to date.&#8221; Sounds perfect, but we need to understand more about it.</p>
<p>We haven’t done much at all with the Search Service Application. We’ve got one Content Source, which is “Local SharePoint Sites”. In other words, it couldn’t be much simpler. Since search will underlie so much of the functionality, we need to understand exactly how the crawls are going to work and what sort of lag time we can expect users to have before they see content that is published. We can’t figure out exactly how Continuous Crawl works under the hood, so today I tried to do some experiments.</p>
<p>I set things to have no schedules to start out just to make things as fresh as possible, and just in case, I did a Full Crawl.</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image0026.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="clip_image002[6]" alt="clip_image002[6]" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image0026_thumb.jpg?resize=440%2C126" border="0" data-recalc-dims="1" /></a></p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image004.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="clip_image004" alt="clip_image004" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image004_thumb.jpg?resize=328%2C216" border="0" data-recalc-dims="1" /></a></p>
<p>When the Full Crawl was done, the Content Source showed this status:</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image006.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="clip_image006" alt="clip_image006" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image006_thumb.jpg?resize=325%2C143" border="0" data-recalc-dims="1" /></a></p>
<p>Next I clicked the <strong>Enable Continuous Crawls</strong> radio button. Note that when I did this, the Incremental Crawl schedule was automatically set to every 4 hours. This can be changed, but the incremental schedule cannot be set to “None” while the <b>Enable Continuous Crawls</b> radio button is selected.</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image008.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="clip_image008" alt="clip_image008" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image008_thumb.jpg?resize=440%2C134" border="0" data-recalc-dims="1" /></a></p>
<p>The Content Source status changed to this:</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image010.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="clip_image010" alt="clip_image010" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image010_thumb.jpg?resize=326%2C147" border="0" data-recalc-dims="1" /></a></p>
<p>In the log, it looks like an Incremental Crawl fired off when I saved that change at 11:34.</p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image012.jpg"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="clip_image012" alt="clip_image012" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image012_thumb.jpg?resize=440%2C166" border="0" data-recalc-dims="1" /></a></p>
<p>I waited for the Incremental Crawl to complete and published a new News Item at 11:37. The new content showed up in the CSWPs and the search results around 11:55. For some reason, a new Incremental Crawl started at 11:55 (21 minutes after the previous crawl).</p>
<p style="text-align: center;"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image014.jpg"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="clip_image014" alt="clip_image014" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image014_thumb.jpg?resize=326%2C141" border="0" data-recalc-dims="1" /></a></p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image016.jpg"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="clip_image016" alt="clip_image016" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image016_thumb.jpg?resize=401%2C175" border="0" data-recalc-dims="1" /></a></p>
<p>I added some more new content at 11:58. That content showed up in the CSWP by 12:09. (I’m not sure exactly how many minutes it took to get there, but it was less than 12.) There’s nothing in the logs to indicate that a crawl occurred:</p>
<p style="text-align: center;"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image018.jpg"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="clip_image018" alt="clip_image018" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image018_thumb.jpg?resize=399%2C182" border="0" data-recalc-dims="1" /></a></p>
<p>At 12:30, There was still nothing new in the logs:</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image020.jpg"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: block; background-image: none;" title="clip_image020" alt="clip_image020" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/clip_image020_thumb.jpg?resize=403%2C182" border="0" data-recalc-dims="1" /></a></p>
<p>All in all, this is still confusing to me. Continuous Crawl seems to be working, but at some underlying schedule which isn’t visible. There have been some suggestions that the Continuous Crawl schedule is set to every 15 minutes by default, and the evidence above seems to support that since the second piece of content showed up in 12 minutes, about 15 minutes after the last crawl that was visible in the logs.</p>
<p>There is some PowerShell you can use to get at properties of the Continuous Crawl, but it’s not totally clear what impact they have on the schedule.</p>
<p>$ssa = Get-SPEnterpriseSearchServiceApplication</p>
<p>$ssa.SetProperty(&#8220;ContinuousCrawlInterval&#8221;,1)</p>
<p>Another thing that&#8217;s not clear is how many Continuous crawl threads might stack up if things get backed up. One person has suggested an unlitimited number and someone else told me there&#8217;s a maximum of 8 threads. Obviously, there&#8217;s not a clear understanding of this, either.</p>
<p>In researching things, there articles/posts seem useful:</p>
<ul>
<li><a title="https://www.nothingbutsharepoint.com/sites/itpro/Pages/What-is-Continuous-Crawl-in-SharePoint-2013.aspx" href="https://www.nothingbutsharepoint.com/sites/itpro/Pages/What-is-Continuous-Crawl-in-SharePoint-2013.aspx">https://www.nothingbutsharepoint.com/sites/itpro/Pages/What-is-Continuous-Crawl-in-SharePoint-2013.aspx</a></li>
<li><a title="http://blog.octavie.nl/index.php/2012/11/23/sharepoint-2013-search-continuous-crawling/" href="http://blog.octavie.nl/index.php/2012/11/23/sharepoint-2013-search-continuous-crawling/">http://blog.octavie.nl/index.php/2012/11/23/sharepoint-2013-search-continuous-crawling/</a></li>
<li><a title="http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/thread/c5bb9c5f-1957-4691-9ae4-fefff880349c" href="http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/thread/c5bb9c5f-1957-4691-9ae4-fefff880349c">http://social.msdn.microsoft.com/Forums/en-US/sharepointsearch/thread/c5bb9c5f-1957-4691-9ae4-fefff880349c</a></li>
</ul>
<p>This TechNet article is way too vague and only focuses on what buttons to push to turn Continuous Crawl on or off:</p>
<ul>
<li><a href="http://technet.microsoft.com/en-us/library/jj219802.aspx">http://technet.microsoft.com/en-us/library/jj219802.aspx</a></li>
</ul>
<p>In my opinion, we need some much clearer documentation from Microsoft to explain how all of this holds together and I&#8217;m trying to track down the right people to see if I can help to make that happen. If you know who those people are an could give me an introduction, I&#8217;d appreciate it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=bBRwILjAmDU:aK4cplCiGgI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/bBRwILjAmDU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/13/sharepoint-2013s-search-continuous-crawl-an-enigma/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sharepoint-2013s-search-continuous-crawl-an-enigma</feedburner:origLink></item>
		<item>
		<title>jQuery Library for SharePoint Web Services (SPServices) 2013.01 Released</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/zqXCplfW1hI/</link>
		<comments>http://sympmarc.com/2013/05/08/jquery-library-for-sharepoint-web-services-spservices-2013-01-released/#comments</comments>
		<pubDate>Wed, 08 May 2013 04:36:53 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16952</guid>
		<description><![CDATA[Tonight I&#8217;ve released SPServices 2013.012. If you are using an earlier version of SPServices, I strongly suggest that you upgrade to this version, as you will see some performance improvements and there is some nice new functionality. Thanks to everyone who downloaded the beta and provided feedback. jQuery Promises By far the most exciting thing in this release &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/08/jquery-library-for-sharepoint-web-services-spservices-2013-01-released/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://spservices.codeplex.com/"><img class="alignright" title="logo.jpg" alt="" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/09/logo33.jpg?resize=312%2C85" align="left" data-recalc-dims="1" /></a>Tonight I&#8217;ve released <a title="SPServices 2013.01" href="https://spservices.codeplex.com/releases/view/92552" target="_blank">SPServices 2013.012</a>. If you are using an earlier version of SPServices, I strongly suggest that you upgrade to this version, as you will see some performance improvements and there is some nice new functionality. Thanks to everyone who downloaded the beta and provided feedback.</p>
<h2>jQuery Promises</h2>
<p>By far the most exciting thing in this release is jQuery promises, or deferred objects. I&#8217;ve written about this several times already <a title="SPServices Futures: Moving to jQuery’s Deferred Objects and More" href="http://sympmarc.com/2013/02/22/spservices-futures-moving-to-jquerys-deferred-objects/" target="_blank">here</a>, <a title="SPServices 2013.01ALPHA4 Returns a Deferred Object (Promise)" href="http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/" target="_blank">here</a> and <a title="Comparing SPServices 2013.01 Calls with Async vs. Promises Methods" href="http://sympmarc.com/2013/05/01/comparing-spservices-2013-01-calls-with-async-vs-promises-methods/" target="_blank">here</a>. I won&#8217;t belabor the point too much, but if you&#8217;re interested in increasing the efficiency of your code and getting ready for the way you are likely to work with the REST Web Services in SharePoint 2013, you should get familiar with using promises.</p>
<h2>Other Release Notes</h2>
<p>There are other goodies in this release, and you can see the full list of enhancements and improvements on the <a title="SPServices 2013.01" href="https://spservices.codeplex.com/releases/view/92552" target="_blank">download page</a>. Note the link to the <a href="https://spservices.codeplex.com/workitem/list/advanced?keyword=&amp;status=Closed&amp;type=All&amp;priority=All&amp;release=SPServices%202013.01&amp;assignedTo=All&amp;component=All&amp;sortField=LastUpdatedDate&amp;sortDirection=Descending&amp;reasonClosed=All&amp;size=50" target="_blank">Issue Tracker items for this release</a>. I&#8217;ve gotten a bit lazy with the release notes, so for this release the items in the Issue Tracker contain all of the details.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=zqXCplfW1hI:6oGgwic5qoE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/zqXCplfW1hI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/08/jquery-library-for-sharepoint-web-services-spservices-2013-01-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/08/jquery-library-for-sharepoint-web-services-spservices-2013-01-released/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=jquery-library-for-sharepoint-web-services-spservices-2013-01-released</feedburner:origLink></item>
		<item>
		<title>Determine if a SharePoint Publishing Page Is in Design Mode (Edit Mode) with Script</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/Jd9bm1Ms018/</link>
		<comments>http://sympmarc.com/2013/05/03/determine-if-a-sharepoint-publishing-page-is-in-design-mode-edit-mode-with-script/#comments</comments>
		<pubDate>Fri, 03 May 2013 20:16:12 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Publishing Sites]]></category>
		<category><![CDATA[SharePoint 2013]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16943</guid>
		<description><![CDATA[Today I was working on some script for the home page of a SharePoint 2013 site which added the jQueryUI accordion behaviour to all of the Web Parts within a Web Part Zone. When I went into edit mode, it was pretty frustrating to have the accorsdions kick in, so I looked around for a way &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/03/determine-if-a-sharepoint-publishing-page-is-in-design-mode-edit-mode-with-script/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Today I was working on some script for the home page of a SharePoint 2013 site which added the jQueryUI accordion behaviour to all of the Web Parts within a Web Part Zone. When I went into edit mode, it was pretty frustrating to have the accorsdions kick in, so I looked around for a way to check to see if a publishing page is in editing mode with script. I&#8217;m pretty syure I&#8217;ve done this before, but it&#8217;s been a while and I couldn&#8217;t find anything in my kit.</p>
<p>Somewhat to my surprise, there were a lot of questions about how to do this out there, but not a lot of good answers. Most of them came down to looking for some element that would only be in the page in edit mode and sounded a little kludgy.</p>
<p>However, I found one over at SharePoint Stack Exchange from <a href="/users/1430/andrey-markeev">Andrey Markeev</a> in a thread called <a href="http://sharepoint.stackexchange.com/questions/12792/how-do-i-know-if-the-page-is-in-edit-mode-from-javascript">How do I know if the page is in Edit Mode from JavaScript?</a> that looks pretty solid to me.</p>
<p>I&#8217;m taking the liberty of including the code here, since this is the first place I look for answers!</p>
<pre class="brush: jscript; title: ; notranslate">
var inDesignMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;

if (inDesignMode == &quot;1&quot;)
{
    // page is in edit mode
}
else
{
    // page is in browse mode
}
</pre>
<p>This will refer to value of the following html input control, which is rendering on the page when it is in edit mode:<br />
<input id="MSOLayout_InDesignMode" type="hidden" name="MSOLayout_InDesignMode" value="1" /><br />
For wiki pages, you will need the _wikiPageMode parameter:</p>
<pre class="brush: jscript; title: ; notranslate">
var wikiInEditMode = document.forms[MSOWebPartPageFormName]._wikiPageMode.value;

if (wikiInEditMode == &quot;Edit&quot;)
{
    // wiki page is in edit mode
}
else
{
    // wiki page is not in edit mode
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=Jd9bm1Ms018:h_GABaNkHx0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/Jd9bm1Ms018" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/03/determine-if-a-sharepoint-publishing-page-is-in-design-mode-edit-mode-with-script/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/03/determine-if-a-sharepoint-publishing-page-is-in-design-mode-edit-mode-with-script/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=determine-if-a-sharepoint-publishing-page-is-in-design-mode-edit-mode-with-script</feedburner:origLink></item>
		<item>
		<title>Comparing SPServices 2013.01 Calls with Async vs. Promises Methods</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/kGjaYAC0NK8/</link>
		<comments>http://sympmarc.com/2013/05/01/comparing-spservices-2013-01-calls-with-async-vs-promises-methods/#comments</comments>
		<pubDate>Thu, 02 May 2013 03:23:32 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Bacon Ipsum]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery deferred]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[promises]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[WSS 3.0]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16937</guid>
		<description><![CDATA[SPServices 2013.01 is almost ready for release and I&#8217;m hoping that when you see the coolness here that you&#8217;ll want to get your hands on the beta to do a little testing with it. I&#8217;ve put together a pretty simple demo page to show how great it can be to use jQuery .Deferred objects (aka &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/05/01/comparing-spservices-2013-01-calls-with-async-vs-promises-methods/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="https://spservices.codeplex.com/releases/view/92552" target="_blank">SPServices 2013.01</a> is almost ready for release and I&#8217;m hoping that when you see the coolness here that you&#8217;ll want to get your hands on the beta to do a little testing with it.</p>
<p>I&#8217;ve put together a pretty <a href="http://www.sympraxisconsulting.com/Demos/Demo%20Pages/ASynch_vs_Promises.aspx" target="_blank">simple demo page</a> to show how great it can be to use <a href="http://api.jquery.com/category/deferred-object/" target="_blank">jQuery .Deferred objects</a> (aka promises) to retrieve data with <a href="http://spservices.codeplex.com" target="_blank">SPServices</a> versus the asynchronous way we&#8217;ve tended to use until now. The demo page is running on my old WSS 3.0 site hosted at FPWeb. Unfortunately, I don&#8217;t have a public-facing SharePoint 2013 instance anywhere yet.</p>
<p>The idea here is pretty simple. I wanted to keep the complexity of the code pretty low and also to use as much common code as possible between the two methods so that the real apples to oranges comparison is the async method versus the promises method.</p>
<p>I&#8217;ve set up three Announcements lists in a single site: Corporate Announcements, Finance Announcements, and HR Announcements. Each list has three announcements in it. I even got to use <a href="http://baconipsum.com/" target="_blank">Bacon Ipsum</a> to fill in some dummy content.</p>
<p>The demo page has two buttons on it: one for async and one for promises. When you push one of the buttons, the script loops through the array containing information about the three lists, retrieves the three items from each of the lists using the chosen method, and displays them on the page. There&#8217;s a slightly different version of the code in each of the functions (getRecentAnnouncementsAsync and getRecentAnnouncementsPromises) that run in each case.</p>
<p>The getRecentAnnouncementsAsync function runs the way we&#8217;re all used to using SPServices. The async option is set to true and processing of the returned data happens inside the completefunc.</p>
<p>In the promises version, the async option isn&#8217;t set, so it has the default of false (we don&#8217;t wait for the returned data, but continue processing). The promise returned from each call to GetListItems is put into an array, and the line <code>$.when.apply($, announcementsPromises).done(...)</code> is where the check for all three promises to be complete happens. When that occurs, the data for the three calls is processed.</p>
<p>Here&#8217;s the code:</p>
<pre class="brush: jscript; title: ; notranslate">
// Show the most recent Announcements from three lists in the current site
var announcementsPerList = 3;
var lists = [
    {name: &quot;Corporate Announcements&quot;},
    {name: &quot;HR Announcements&quot;},
    {name: &quot;Finance Announcements&quot;}
  ];
var camlQuery = &quot;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name='Created' Ascending='FALSE'/&gt;&lt;/OrderBy&gt;&lt;/Query&gt;&quot;;
var camlViewFields = &quot;&lt;ViewFields&gt;&quot; +
    &quot;&lt;FieldRef Name='ID' /&gt;&quot; +
    &quot;&lt;FieldRef Name='Title' /&gt;&quot; +
    &quot;&lt;FieldRef Name='Body' /&gt;&quot; +
    &quot;&lt;FieldRef Name='Author' /&gt;&quot; +
    &quot;&lt;FieldRef Name='Created' /&gt;&quot; +
    &quot;&lt;FieldRef Name='FileDirRef' /&gt;&quot; +
  &quot;&lt;/ViewFields&gt;&quot;;
var out;

$(document).ready(function() {

//$(&quot;#ctl00_site_share_button&quot;).hide();
  $(&quot;input[value='async']&quot;).click(function() {

    getRecentAnnouncementsAsync();

  });

  $(&quot;input[value='promises']&quot;).click(function() {

    getRecentAnnouncementsPromises();

  });

});

//++++++++++++++++++++++++++++++++++++

function getRecentAnnouncementsAsync() {

  var recentAnnouncementsContainer = $(&quot;#demo-recent-announcements&quot;);
  recentAnnouncementsContainer.empty();
  recentAnnouncementsContainer.addClass(&quot;demo-loading&quot;);

  out = &quot;&lt;table&gt;&quot;;
  announcementHeader();

  for(var i=0; i &lt; lists.length; i++) {

    $().SPServices({
      operation: &quot;GetListItems&quot;,
      async: true,
      listName: lists[i].name,
      CAMLQuery: camlQuery,
      CAMLViewFields: camlViewFields,
      CAMLRowLimit: announcementsPerList,
      completefunc: function(xData) {

        // List header
        out += &quot;&lt;tr&gt;&lt;td class='demo-section-header' colspan='99'&gt;&quot; + lists[i].name + &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;

        $(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function(itemNum) {

          processAnnouncement(i, $(this));

        });

      }
    });

  }

  out += &quot;&lt;/table&gt;&quot;;
  $(&quot;#demo-recent-announcements&quot;).removeClass(&quot;demo-loading&quot;);
  recentAnnouncementsContainer.html(out);

}
function getRecentAnnouncementsPromises() {

  var recentAnnouncementsContainer = $(&quot;#demo-recent-announcements&quot;);
  recentAnnouncementsContainer.empty();
  var announcementsPromises = [];
  recentAnnouncementsContainer.addClass(&quot;demo-loading&quot;);

  out = &quot;&lt;table&gt;&quot;;
  announcementHeader();

  for(var i=0; i &lt; lists.length; i++) {

    announcementsPromises[i] = $().SPServices({
      operation: &quot;GetListItems&quot;,
      listName: lists[i].name,
      CAMLQuery: camlQuery,
      CAMLViewFields: camlViewFields,
      CAMLRowLimit: announcementsPerList
    });

  }

  // When all of the promises are fulfilled...
  $.when.apply($, announcementsPromises).done(function() {
    for(var i=0; i &lt; lists.length; i++) {

      // List header
      out += &quot;&lt;tr&gt;&lt;td class='demo-section-header' colspan='99'&gt;&quot; + lists[i].name + &quot;&lt;/td&gt;&lt;/tr&gt;&quot;;

      $(announcementsPromises[i].responseXML).SPFilterNode(&quot;z:row&quot;).each(function(itemNum) {

        processAnnouncement(i, $(this));

      });

    }

    out += &quot;&lt;/table&gt;&quot;;
    $(&quot;#demo-recent-announcements&quot;).removeClass(&quot;demo-loading&quot;);
    recentAnnouncementsContainer.html(out);

  });

}

function getNow() {

  return new Date();

}

function announcementHeader() {

  out += &quot;&lt;tr class='ms-WPHeader'&gt;&lt;td colspan='99'&gt;&lt;h3 class='ms-standardheader ms-WPTitle'&gt;Recent Announcements as of &quot; + getNow() + &quot;&lt;/h3&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
  out += &quot;&lt;tr&gt;&quot; +
      &quot;&lt;th class='ms-vh2'&gt;Title&lt;/th&gt;&quot; +
      &quot;&lt;th class='ms-vh2'&gt;Body&lt;/th&gt;&quot; +
      &quot;&lt;th class='ms-vh2'&gt;Created By&lt;/th&gt;&quot; +
      &quot;&lt;th class='ms-vh2'&gt;Created&lt;/th&gt;&quot; +
    &quot;&lt;/tr&gt;&quot;;

}

function processAnnouncement(i, item) {

  out += &quot;&lt;tr&gt;&quot;;

  // Title as a link to the announcement
  var thisLink = item.attr(&quot;ows_FileDirRef&quot;).split(&quot;;#&quot;);
  out += &quot;&lt;td class='ms-vb demo-note-details' style='width:40%;'&gt;&quot; +
      &quot;&lt;a href='/&quot; + thisLink[1] + &quot;/DispForm.aspx?ID=&quot; + thisLink[0] + &quot;&amp;Source=&quot; + location.href + &quot;' data-announcement-id='&quot; + item.attr(&quot;ows_ID&quot;) +
        &quot;' data-list='&quot; + lists[i].name + &quot;' &gt;&quot; +
        item.attr(&quot;ows_Title&quot;) +
      &quot;&lt;/a&gt;&quot; +
    &quot;&lt;/td&gt;&quot;;

  // Body
  var thisBody = item.attr(&quot;ows_Body&quot;);
  out += &quot;&lt;td class='ms-vb'&gt;&quot; + ((typeof thisBody !== &quot;undefined&quot;) ? thisBody : &quot;NA&quot;) + &quot;&lt;/td&gt;&quot;;

  // Author as a link to the User Profile
  var thisAuthor = item.attr(&quot;ows_Author&quot;).split(&quot;;#&quot;);
  out += &quot;&lt;td class='ms-vb' style='width:15%;'&gt;&quot; +
      &quot;&lt;a href='/_layouts/userdisp.aspx?ID=&quot; + thisAuthor[0] + &quot;' onclick='GoToLink(this);return false;'&gt;&quot; + thisAuthor[1] + &quot;&lt;/a&gt;&quot; +
    &quot;&lt;/td&gt;&quot;;

  // Created date/time
  out += &quot;&lt;td class='ms-vb' style='width:15%;'&gt;&quot; + item.attr(&quot;ows_Created&quot;) + &quot;&lt;/td&gt;&quot;;

  out += &quot;&lt;/tr&gt;&quot;;

}
</pre>
<p>Note that I&#8217;m using the same version of SPServices here. SPServices 2013.01 can be used as you&#8217;re used to using it and everything will work as you are used to. If you are making multiple calls and the promises method would make more sense (mainly in terms of efficiency), then you can take advantage of it.</p>
<p>There are two big benefits of using the promises method:</p>
<ul>
<li>If there are multiple calls to the Web Services that can logically happen concurrently (there&#8217;s less benefit if there is only one call), the promises method allows that to happen.</li>
<li>In the promises method, the browser doesn&#8217;t get locked up like it does with the async method. Setting async to true means that the browser is going to wait for the results to come back from the call before it will allow anything else to happen. With promises, the processing continues even when the results aren&#8217;t available. (This can take some getting used to, and I&#8217;ll undoubtedly do more posts about it.)</li>
</ul>
<p>I&#8217;ve tested the code in SharePoint 2013 on Office365 and WSS 3.0 at FPWeb, which are about the most opposite ends of the spectrum that we can try these days. The code that I tested is *exactly* the same in the two environments. I simply copied and pasted the file from SharePoint 2013 where I started into the WSS 3.0 environment. How&#8217;s that for consistency, even on a <em>downgrade</em>? Oh, if Microsoft&#8217;s code only did that!</p>
<p>Using Firebug, I&#8217;ve captured information from the two methods on the Net tab for the XHR traffic.</p>
<p>Here are the results in SharePoint 2013:</p>
<p>Async</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb.png?resize=440%2C48" border="0" data-recalc-dims="1" /></a></p>
<p>Promises</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/image1.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb1.png?resize=440%2C49" border="0" data-recalc-dims="1" /></a></p>
<p>As you can see the total elapsed time decreased from about 503ms to 107ms. These results are fairly consistent. I haven&#8217;t tried to build any fancy instrumentation around it, but if I click the buttons repeatedly, I get consistent results in both cases.</p>
<p>Here are the results from WSS 3.0:</p>
<p>Asynch</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/image2.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb2.png?resize=440%2C56" border="0" data-recalc-dims="1" /></a></p>
<p>Promises</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/05/image3.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/05/image_thumb3.png?resize=440%2C58" border="0" data-recalc-dims="1" /></a></p>
<p>Here, the total elapsed time decreased from about 409ms to 130ms.</p>
<p>In both versions of SharePoint, you can quite obviously see the difference. With the async method, the three calls happen in order, whereas with the promises method, they happen pretty much concurrently. (Even with promises, there&#8217;s a small lag due to the processing to set up the calls.)</p>
<p>But don&#8217;t take my word for it. go and grab your own copy of SPServices 2013.01 and try it yourself.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=kGjaYAC0NK8:1UX3AXc6dbQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/kGjaYAC0NK8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/05/01/comparing-spservices-2013-01-calls-with-async-vs-promises-methods/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/05/01/comparing-spservices-2013-01-calls-with-async-vs-promises-methods/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=comparing-spservices-2013-01-calls-with-async-vs-promises-methods</feedburner:origLink></item>
		<item>
		<title>SharePoint Saturday Boston 2013 Wrap Up</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/LLRQjPcXS4w/</link>
		<comments>http://sympmarc.com/2013/04/27/sharepoint-saturday-boston-2013-wrap-up/#comments</comments>
		<pubDate>Sun, 28 Apr 2013 03:44:30 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Saturday Boston]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16917</guid>
		<description><![CDATA[Thanks to all who came to my session &#8220;Creating a Great User Experience in SharePoint&#8221; today at SharePoint Saturday Boston 2013. As promised, I&#8217;ve posted the slides to SlideShare. You can either view them on SlideShare or below. As always, I learned a lot from the conversations and other sessions. It&#8217;s great to have the chance to &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/27/sharepoint-saturday-boston-2013-wrap-up/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Thanks to all who came to my session &#8220;Creating a Great User Experience in SharePoint&#8221; today at <a title="SharePoint Saturday Boston" href="http://www.spsboston.org" target="_blank">SharePoint Saturday Boston</a> 2013. As promised, I&#8217;ve posted the slides to SlideShare. You can either <a href="http://www.slideshare.net/sympmarc/sps-boston-creating-a-great-user-experience-in-sharepoint" target="_blank">view them on SlideShare</a> or below.</p>
<p>As always, I learned a lot from the conversations and other sessions. It&#8217;s great to have the chance to talk to people about what they are doing with SharePoint and especially SPServices. (The new SPServices 2013.01 is ready for release! Just a little tidying up and some doc writing.)</p>
<p>A big THANK YOU goes out to Talbott Crowell (<a title="@talbott" href="http://twitter.com/talbott" target="_blank">@talbott</a>), Geoff Varosky (<a title="@gvaro" href="http://twitter.com/gvaro" target="_blank">@gvaro</a>), Chris Bortlik (<a title="@cbortlik" href="http://twitter.com/cbortlik" target="_blank">@cbortlik</a>), and especially Pradeepa &#8220;Peeps&#8221; Siva (<a title="@PipsTips" href="http://twitter.com/PipsTips" target="_blank">@PipsTips</a>) who puts up with them and the rest of us SharePoint freaks.</p>
<p><iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/20100262?rel=0" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="text-align: center; margin-bottom: 5px;"><strong> <a title="SPS Boston - Creating a Great User Experience in SharePoint" href="http://www.slideshare.net/sympmarc/sps-boston-creating-a-great-user-experience-in-sharepoint" target="_blank">SPS Boston &#8211; Creating a Great User Experience in SharePoint</a> </strong> from <strong><a href="http://www.slideshare.net/sympmarc" target="_blank">Marc D Anderson</a></strong></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=LLRQjPcXS4w:ScyHCHmFvnE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/LLRQjPcXS4w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/27/sharepoint-saturday-boston-2013-wrap-up/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/04/27/sharepoint-saturday-boston-2013-wrap-up/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sharepoint-saturday-boston-2013-wrap-up</feedburner:origLink></item>
		<item>
		<title>SharePoint Designer 2013 Crashing on Open Site: The Fix</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/VHdYponx3qA/</link>
		<comments>http://sympmarc.com/2013/04/16/sharepoint-designer-2013-crashing-on-open-site-the-fix/#comments</comments>
		<pubDate>Tue, 16 Apr 2013 16:57:18 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Design View]]></category>
		<category><![CDATA[regedit]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[SharePoint Designer 2007]]></category>
		<category><![CDATA[SharePoint Designer 2010]]></category>
		<category><![CDATA[SharePoint Designer 2013]]></category>
		<category><![CDATA[SPD2007]]></category>
		<category><![CDATA[SPD2010]]></category>
		<category><![CDATA[SPD2013]]></category>
		<category><![CDATA[Split View]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16883</guid>
		<description><![CDATA[The Problem My Office365 tenant has become half-upgraded from SharePoint 2010 to SharePoint 2013. (If you want to read more of my whinging about this, checkout this thread on SPYam.) This leaves me in the unenviable position of having to use SharePoint Designer 2013 (SPD2013) with my SharePoint 2010 Office 365 tenant. Unenviable because, as &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/16/sharepoint-designer-2013-crashing-on-open-site-the-fix/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<h2>The Problem</h2>
<p>My Office365 tenant has become half-upgraded from SharePoint 2010 to SharePoint 2013. (If you want to read more of my whinging about this, checkout <a href="https://www.yammer.com/spyam/#/Threads/show?threadId=285191168" target="_blank">this thread on SPYam</a>.)</p>
<p>This leaves me in the unenviable position of having to use SharePoint Designer 2013 (SPD2013) with my SharePoint 2010 Office 365 tenant. Unenviable because, as anyone who follows me even occasionally knows, the <a href="http://social.technet.microsoft.com/Forums/en-US/sharepointitpropreview/thread/8f8e2cb3-a90f-4653-9d22-050f9f0d8612" target="_blank">Design and Split Views are not available in SharePoint Designer 2013</a>. That thread that I started on TechNet has over 28,000 views, so I don&#8217;t think that I&#8217;m the only one upset by this.</p>
<p>When I installed SPD2013 on my laptop, all went well. However, every time I tried to use the Open Site dialog, it would crash. SharePoint Designer 2010 (SPD2010) was still working fine when I accessed other 2010-based installations, but not SPD2013.</p>
<p>I found a fix that worked for me in the Technet forums. You may or may not want to trawl through the <a href="http://social.technet.microsoft.com/Forums/en-US/officeitpropreview/thread/9830bbd4-a98a-4169-b36f-853c7dcfdc9c" target="_blank">thread</a>, as it is quite long. Instead, here&#8217;s the Cliff Notes version of what worked for me.</p>
<p><a href="http://social.technet.microsoft.com/profile/sungmin%20kim/?ws=usercard-mini">Sungmin Kim</a> from Microsoft offered up this check.</p>
<blockquote><p>You can repair your SPD 2010 to restore the regkey for SPD2010.</p>
<p>The issue might happen in case the ClientGUID of the Open Site dialog in SPD14 is the same as the one of the open site dialog in SPD 15 in a certain Side by Side environment.</p>
<p>(this repro&#8217;s only in a specific environment, but I couldn&#8217;t find the enviroment yet and when the GUIDs could be the same)</p>
<p>so I have couple of questions. Sorry to bother you, :(</p>
<p>1. Could you please check if ClientGUID value under HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site is the same as the ClientGUID value under HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site?</p>
<p>2. If the values are the same, could you please check if the crash still happens after removing both registry keys?</p>
<p>3. Have you ever installed any other version of SPD15 on your machine? (e.g. beta version) or any other version of SPD14?</p>
<p>4. if the issue still happens at #2, how about removing the registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDLg32\LastVisitedPidlMRU ?</p></blockquote>
<p>Points 1 and 2 did the trick for me. Apparently both SPD2010 and SPD2013 had the same GUID for the ClientGUID value in the registry. I had not installed any betas of SPD2013 on my laptop because I was concerned about exactly this sort of incompatibility. (I&#8217;d limited my use of SPD2013 to launching it inside virtual machines.)</p>
<h2>The Fix</h2>
<p>If you have this problem and want to fix it, here are the steps.</p>
<p>Open the Registry Editor. You can do this by going to the Start menu (I&#8217;m still a Windows 7 stalwart, so I can&#8217;t vouch for how this might work on Windows 8), choosing &#8220;Run&#8221;, and typing &#8220;regedit&#8221; in the <strong>Open:</strong> box.</p>
<p>Look for the keys:</p>
<p><em>HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site</em></p>
<p>and</p>
<p><em>HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site</em></p>
<p>In my case, they were identical, as shown below.</p>
<p>SharePoint Designer 2010 (14.0)</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image10.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb10.png?resize=440%2C44" border="0" data-recalc-dims="1" /></a></p>
<p>SharePoint Designer 2013 (15.0)</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image11.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb11.png?resize=440%2C44" border="0" data-recalc-dims="1" /></a></p>
<p>Delete both of the ClientGUID keys. You can do this by highlighting the key and hitting the Delete key or right clicking and choosing Delete.</p>
<p>Once I had deleted these two registry keys, I was able to open sites in both versions of SharePoint Designer with no problems.</p>
<p>Unfortunately, the two versions of SharePoint Designer seem to use the same recent sites list, so I see the same Recent Sites in both versions. This is going to make it confusing when I am trying to figure out which site to open. Now I&#8217;m a three SharePoint Designer version guy, as I&#8217;m still using SPD2007 and SPD2010 for client work in addition to SPD2013. Yeesh.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=VHdYponx3qA:0-79FWHHEjY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/VHdYponx3qA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/16/sharepoint-designer-2013-crashing-on-open-site-the-fix/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/04/16/sharepoint-designer-2013-crashing-on-open-site-the-fix/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sharepoint-designer-2013-crashing-on-open-site-the-fix</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #13: Durandal SP3: Developing SharePoint SPAs Made Easy</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/3X7OtT4O15Y/</link>
		<comments>http://sympmarc.com/2013/04/15/spservices-stories-13-durandal-sp3-developing-sharepoint-spas-made-easy/#comments</comments>
		<pubDate>Mon, 15 Apr 2013 19:56:57 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Durandal]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[MDS]]></category>
		<category><![CDATA[Minimal Download Strategy]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[Single Page Application]]></category>
		<category><![CDATA[SPA]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16862</guid>
		<description><![CDATA[This entry is part 13 of 13 in the series SPServices StoriesIntroduction Rainer Wittman (@RainerAtSpirit) and I have been emailing back and forth for a few weeks now. He&#8217;s been trying out the new alpha of SPServices 2013.01 which includes jQuery promises aka Deferred objects capabilities (soon to be a real release, I promise!) with &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/15/spservices-stories-13-durandal-sp3-developing-sharepoint-spas-made-easy/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 13 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Rainer Wittman (<a title="@RainerAtSpirit" href="http://twitter.com/RainerAtSpirit/" target="_blank" rel="me">@RainerAtSpirit</a>) and I have been emailing back and forth for a few weeks now. He&#8217;s been trying out the <a title="SPServices 2013.01" href="https://spservices.codeplex.com/releases/view/92552" target="_blank">new alpha of SPServices 2013.01</a> which includes <a title="Deferred object" href="http://api.jquery.com/category/deferred-object/" target="_blank">jQuery promises aka Deferred objects capabilities</a> (soon to be a real release, I <strong>promise</strong>!) with the <a title="Durandal SP3" href="http://durandaljs.com/" target="_blank">Durandal</a> JavaScript framework. Durandal is a framework for building SPAs, or <a title="Single Page Applications" href="http://en.wikipedia.org/wiki/Single_page_application" target="_blank">Single Page Applications</a>.</p>
<p>This is something that SharePoint 2013 does to some degree with the Minimal Download Strategy (MDS). If you&#8217;re interested in how MDS works, here are some posts that go into more detail about it:</p>
<ul>
<li><a title="SharePoint 2013 - Introduction to the Minimal Download Strategy (MDS)" href="http://www.wictorwilen.se/sharepoint-2013---introduction-to-the-minimal-download-strategy-mds" target="_blank">SharePoint 2013 &#8211; Introduction to the Minimal Download Strategy (MDS)</a> from <a href="/">Wictor Wilén</a> (<a title="@wictor" href="http://twitter/com/wictor" target="_blank">@wictor</a>)</li>
<li><a title="Minimal Download Strategy in SharePoint 2013" href="http://blog.furuknap.net/minimal-download-strategy-in-sharepoint-2013" rel="bookmark">Minimal Download Strategy in SharePoint 2013</a> from <a title="Posts by Bjørn Furuknap" href="http://blog.furuknap.net/author/furuknap" rel="author">Bjørn Furuknap</a> (<a title="@furuknap" href="http://twitter.com/furuknap" target="_blank">@furuknap</a>)</li>
</ul>
<p>Those of you who are purists will tell me that I&#8217;m comparing apples and oranges, and that&#8217;s sort of true. However, the goals are similar: send as little of the page transitions down the wire as possible to make those transitions as fluid and responsive as possible. We see this sort of approach more and more, especially in mobile interfaces.</p>
<p>I&#8217;ve done SPA-like things even with SharePoint 2007 using AJAX. By maintaining the overall chrome of the page (top nav, Quick Launch, footer) as a constant, we can do something as simple as AJAXing in a new copy of the same page, parsing out the main panel, and replacing it in the user&#8217;s current copy of the page in the DOM. You also see this in SharePoint 2010 with the asynchronous refresh capability available with some Web Parts (See: <a href="http://sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=56">Asynchronous<br />
Update in SharePoint 2010</a> from <a title="@wonderlaura" href="http://twitter.com/wonderlaura" target="_blank">@wonderlaura</a>).</p>
<p>If you haven&#8217;t heard of Durandal (I hadn&#8217;t), here&#8217;s some information swiped from the Durandal home page:</p>
<blockquote>
<h4>Comfortable</h4>
<p>We didn&#8217;t try to re-invent the wheel. Durandal is built on libs you know and love like <a href="http://jquery.com/">jQuery</a>, <a href="http://knockoutjs.com/">Knockout</a> and <a href="http://requirejs.org/">RequireJS</a>. There&#8217;s little to learn and building apps feels comfortable and familiar. Dive in and enjoy.</p>
<div>
<h4>Feature-rich</h4>
<p>MVC? MVP? MVVM? Yes. Messaging, navigation, modals? Check. Durandal has the features you need to build whatever apps you can imagine; the apps of today and of tomorrow. Let your creativity soar.</p>
</div>
<div>
<h4>Versatile</h4>
<p>Building an Android phone app? An enterprise LOB targeted at Windows? A web gaming platform? No matter how large or small the app, it&#8217;s effortless with Durandal&#8230;.and we give you the tools to develop on any platform, for any platform.</p>
</div>
</blockquote>
<p>I expect we&#8217;ll hear more from Rainer about this cool way of building SharePoint interfaces. As you read through his post below, you&#8217;ll probably be very impressed to see that his approach works for SharePoint 2007, 2010, or 2013. If you&#8217;re still on 2007 and woulds like to make your installation fell a heck of a lot more &#8220;modern&#8221;, this is an approach that has legs going forward. You&#8217;ll also see some links in his post to live, working demo pages so that you can get a feel for what he is driving at.</p>
<p>This article was originally posted on Rainer&#8217;s blog at <a title="Durandal SP3: Developing SharePoint SPAs made easy" href="http://rainerat.spirit.de/2013/04/08/durandal-sp3-developing-sharepoint-spas-made-easy/" target="_blank">Durandal SP3: Developing SharePoint SPAs made easy</a>.</p>
<h2>Durandal SP3: Developing SharePoint SPAs Made Easy</h2>
<p>Hi there,</p>
<p>In the last post I introduced you to <a href="http://www.durandaljs.com">Durandal</a> a SPA Framework, which can be used to create SPAs on top of the SharePoint infrastructure. This time we’re going to leverage Marc Anderson’s <a href="http://spservices.codeplex.com/">SPServices</a> as a data service for our SPA.</p>
<p>The obvious advantage is that web services are around for a long time, so one SPA (same code base) runs in SharePoint (2003), 2007, 2010 and 2013.</p>
<p>The obvious disadvantage is that web services are deprecated in 2013, so they might go away with the next major release. If you are already running on 2010/2013 and don’t have to support older browser versions you might want looking into using REST services with <a href="http://jaydata.org">JayData</a> or <a href="http://www.breezejs.com">Breeze</a> instead… but that’s worth another story.</p>
<p>Seeing is believing so here a couple of screen shots using IE versions that roughly matches the SP release time.</p>
<h4 id="sharepoint_2013__ie_10">SharePoint 2013 | IE 10: <a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2013Demo.jpg"><img class="aligncenter size-full wp-image-16871" alt="2013-04-08-SP2013Demo" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2013Demo.jpg?resize=440%2C330" data-recalc-dims="1" /></a></h4>
<h4 id="sharepoint_2010__ie_8">SharePoint 2010 | IE 8:</h4>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2010Demo.jpg"><img class="aligncenter size-full wp-image-16870" alt="2013-04-08-SP2010Demo" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2010Demo.jpg?resize=440%2C330" data-recalc-dims="1" /></a></p>
<h4 id="sharepoint_2007__ie_7">SharePoint 2007 | IE 7:</h4>
<p>In SP2007 you’ll notice some issues with the CSS that is used in the SPA otherwise it’s fully functional. That is less an issue with IE7, but more with SP2007 that is running pages in Quirks mode. A quick workaround would be to apply a DOCTYPE to the pages that host your SPA.</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2007Demo.jpg"><img class="aligncenter size-full wp-image-16869" alt="2013-04-08-SP2007Demo" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-SP2007Demo.jpg?resize=440%2C345" data-recalc-dims="1" /></a></p>
<h4 id="sharepoint_2003__ie_6">SharePoint 2003 | IE 6:</h4>
<p>Sorry, I’m out of historic SharePoint VMs. Please give me a shot if somebody has still access to a SP2003 environment. I’d love to add the missing screen shot.</p>
<p>Now, after hopefully getting you excited, here’s the bad news. The demo is using the alpha release <strong>2013.01ALPHA5</strong> of <a href="http://spservices.codeplex.com/">SPServices</a>, so I won’t make the demo code available through Github as usual. I’ll update this post once the next official version of SPServices has been released and tested with Durandal SP3.</p>
<p>The good news is that there are two public available pages that allows you to go hands-on. Both are best viewed with your favorite console open.</p>
<ol>
<li><a href="http://www.spirit.de/demos/metro/DurandalSP3/index.html#/">development version:</a></li>
<li><a href="http://www.spirit.de/demos/metro/DurandalSP3/WebPartPage2010.aspx#/">optimized build:</a></li>
</ol>
<p>Without going into the details let see what the Promises demo app is doing when you activate the list route (/#lists).</p>
<ol>
<li>Retrieve information about the lists in the current site via SPServices <code>GetListCollection</code> method (with caching)</li>
<li>Retrieve detail information about the selected list via SPServices <code>GetList</code> method and build a mapping that can be used in SPServices <code>SPXmlToJson</code> method (with caching)</li>
<li>Retrieve item information via SPServices <code>GetListItems</code> (NO caching)</li>
</ol>
<p><strong>Update 2013/04/11:</strong> The life demo was updated based on some feedback I got. The list overview now produces a configurable row view of lists with meta information like ItemCount and Last Modified. Step 2 and 3 are performed once you select a list.</p>
<p>By opening up the <a href="http://www.spirit.de/demos/metro/DurandalSP3/WebPartPage2010.aspx#/">optimized build</a> and filtering the network tab for XHR you can see the three POST requests to <code>lists.asmx</code> nicely lined up. Once you start selecting other lists, you’ll noticed that the number of XHR requests decrease as more and more cached information becomes available.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-OptimizedBuild.jpg"><img class="aligncenter size-full wp-image-16868" alt="2013-04-08-OptimizedBuild" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-OptimizedBuild.jpg?resize=440%2C329" data-recalc-dims="1" /></a></p>
<p>The development version on the other side shows far more details via the console. That allows you to get familiar with Durandal’s application life cycle and to inspect the Json result of some <code>spdata</code> methods.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-Development.jpg"><img class="aligncenter size-full wp-image-16867" alt="2013-04-08-Development" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/2013-04-08-Development.jpg?resize=440%2C329" data-recalc-dims="1" /></a></p>
<p>After reading so far and hopefully seen the Promises demo in action by yourself, I hope that you share my excitement of the upcoming promise support in <a href="http://spservices.codeplex.com/">SPServices</a>. Once it’s part of an official release <a href="http://spservices.codeplex.com/">SPServices</a> will become a perfect fit for Durandal’s life cycle methods.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=3X7OtT4O15Y:JcTKTkPawuQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/3X7OtT4O15Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/15/spservices-stories-13-durandal-sp3-developing-sharepoint-spas-made-easy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/04/15/spservices-stories-13-durandal-sp3-developing-sharepoint-spas-made-easy/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-13-durandal-sp3-developing-sharepoint-spas-made-easy</feedburner:origLink></item>
		<item>
		<title>Setting Up BCS and the Secure Store Service in SharePoint 2010</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/TkUKiZt3gkU/</link>
		<comments>http://sympmarc.com/2013/04/10/setting-up-bcs-and-the-secure-store-service-in-sharepoint-2010/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 20:57:41 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[BCS]]></category>
		<category><![CDATA[External Content Type]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16856</guid>
		<description><![CDATA[It&#8217;s supposed to be simple to set up an External Content Type with SharePoint Designer. You just create the connection, flick a few settings, and voila, you&#8217;ve got external data available in SharePoint. At least every time I&#8217;ve seen it demoed, it works really well. The blog posts out there also paint is as a &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/10/setting-up-bcs-and-the-secure-store-service-in-sharepoint-2010/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s supposed to be simple to set up an External Content Type with SharePoint Designer. You just create the connection, flick a few settings, and voila, you&#8217;ve got external data available in SharePoint. At least every time I&#8217;ve seen it demoed, it works really well. The blog posts out there also paint is as a &#8220;few clicks and you&#8217;re done&#8221; thing.</p>
<p>However, it&#8217;s not one of those things that&#8217;s always simple. In most situations, you have some authentication mumbo-jumbo that you want to work in between the External Content Type and the external data source (in this case it was SQL).</p>
<p>My colleague <a href="http://www.linkedin.com/pub/roberto-cremonini/0/36/731" target="_blank">Roberto Cremonini</a> and I have been working for a client together for a while now. I&#8217;ve known Roberto for years and years, since we worked together at Renaissance Solutions together in the mid-1990s. It&#8217;s great how relationships one builds earlier in one&#8217;s career can continue to bear fruit both professionally and personally over time.</p>
<p>Our goal for this little project was fairly simple. The client has a third-party software package which is used to manage the financial aspects of the business. The package uses SQL Server as its database and there is a table containing information about Partners and another which contains Projects. Think of the classic Client / Project combination you have in a consulting company, and you&#8217;ll understand the idea. We don&#8217;t want to maintain that data in SharePoint because it already exists in the software package &#8220;line of business&#8221; (LOB) system.</p>
<p>We need everyone in the organization to be able to read from the list of Partners and Projects because we want to use them in Site Columns which we can add to multiple Content Types. If you think about it, those two pieces of data are relevant for many different types of content; the majority of the work of the organization is done for or with a Partner in the context of a Project.</p>
<p>So off to Central Administration to set things up in the Secure Store Service. Suffice it to say that we set everything up (multiple times) the way we thought were supposed to. What ended up not being clear was what account(s) were required to make things work and how those accounts should be configured.</p>
<p>There are a number of good blog posts giving instructions about how to set this up, including a nice one on Fabian Williams&#8217; (<a title="@fabianwilliams" href="http://twitter.com/fabianwilliams" target="_blank">@fabianwilliams</a>) blog <a href="http://fabiangwilliams.wordpress.com/2010/04/16/how-to-create-configure-consume-sharepoint-2010-secure-store-in-business-connectivity-services/" target="_blank">How To: Create, Configure, Consume SharePoint 2010 Secure Store in Business Connectivity Services</a>. However, they are all a bit too cookie-cutter and &#8220;techie&#8221; to be useful, in my opinion. None of them talk about what can go wrong and why, which always ends up sending you down rat holes.</p>
<p>Once you have the Secure Store Service set up (I&#8217;m not running through the steps here; see Fabian&#8217;s post and quite a few others), setting up the connection in SharePoint Designer is seemingly straightforward. You simply provide the Database Server, Database Name and which Secure Store Application ID (called the Target Application ID in Central Administration, natch) you want to use.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/04/image9.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb9.png?resize=440%2C254" border="0" data-recalc-dims="1" /></a></p>
<p>No matter how we set things up in the Secure Store Service, when we tried to connect to the SQL Server Database in SharePoint Designer, we got the error &#8220;Cannot logon with credentials obtained from Secure Store Provider.&#8221;</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/SNAGHTML4b86215.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="SNAGHTML4b86215" alt="SNAGHTML4b86215" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/SNAGHTML4b86215_thumb.png?resize=440%2C127" border="0" data-recalc-dims="1" /></a></p>
<p>We found &#8211; in our environment, at least – that a domain account wouldn&#8217;t work. Instead, we created a SQL Account with SQL authentication and things worked right away. See this useful post <a href="http://blog.arjanfraaij.com/2011/07/sharepoint-2010-using-bcs-with-sql.html" target="_blank">SharePoint 2010 using BCS with SQL Server database</a> by <a href="http://www.blogger.com/profile/00168923134472313722">Arjan Fraaij</a>.</p>
<p>Following this post, we created two external lists for Partners and Projects in our SharePoint site and we thought we were done. Instead, we realized that our admin account was the only user who could see the External List content. All other users would get an error that read more or less as &#8220;Access Denied by Business Data Connectivity. Correlation ID: &#8230;&#8221;. After some trial and error, we solved the problem by following a few additional steps:</p>
<ul>
<li>In Central Administration, go to Manage Service Applications and select Business Data Connectivity Service.</li>
<li>From the drop down menu choose &#8220;Set Permissions&#8221;.</li>
<li>Add All Authenticated Users and set permission to Execute</li>
<li>In Central Administration, go to Manage Service Applications and select the Secure Store Service used to logon and from the drop down menu choose edit.</li>
<li>Click next twice until you get to the page where you see Administrators on top and Members below.</li>
<li>Add All Authenticated Users to Members.</li>
<li>Voilà</li>
</ul>
<p>These settings may be too open for your environment, but for this client we wanted everyone to be able to read from these lists. The majority of them have access to the LOB system in some way, and the Partner and Project information is known to everyone in the organization.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=TkUKiZt3gkU:n56k4xyfDAU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/TkUKiZt3gkU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/10/setting-up-bcs-and-the-secure-store-service-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/04/10/setting-up-bcs-and-the-secure-store-service-in-sharepoint-2010/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=setting-up-bcs-and-the-secure-store-service-in-sharepoint-2010</feedburner:origLink></item>
		<item>
		<title>Displaying Blog Posts in Different Sites in SharePoint 2010</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/LVODt7CXNmw/</link>
		<comments>http://sympmarc.com/2013/04/06/displaying-blog-posts-in-different-sites-in-sharepoint-2010/#comments</comments>
		<pubDate>Sat, 06 Apr 2013 14:17:15 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Data View Web Part]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint Designer 2010]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16847</guid>
		<description><![CDATA[SharePoint blogs are no one&#8217;s favorite. There is just enough functionality there to make them useful, but not enough functionality to make them useful enough. On top of that, blogs are sites, not lists. That seems counterintuitive on one level – isn&#8217;t it just a list of posts? – but it makes sense on other &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/06/displaying-blog-posts-in-different-sites-in-sharepoint-2010/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>SharePoint blogs are no one&#8217;s favorite. There is just enough functionality there to make them useful, but not enough functionality to make them useful enough. On top of that, blogs are sites, not lists. That seems counterintuitive on one level – isn&#8217;t it just a list of posts? – but it makes sense on other levels. There are actually three important lists in a blog site: Posts, Comments, and Categories. There are two other lists as well – Photos and Links – but I rarely see them used in blog sites.</p>
<p>Because there are multiple lists and the site itself has some unique functionality, it actually does make sense that it is a separate site that uses a unique Site Template.</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb.png?resize=440%2C255" border="0" data-recalc-dims="1" /></a></p>
<p>One problem with this is that it is then difficult to display blog posts in other sites. Sure, you can use the Content Query Web Part (CQWP) to do it, but the display options out of the box are pretty abysmal. Other options are an RSS Web Part or even search.</p>
<p>However, if you want to display blog posts elsewhere with any sort of fidelity, you will probably want to use a Data View Web Part (DVWP).</p>
<p>In this post, I&#8217;ll show you the quick steps to make that work, without much beautification. I&#8217;ll assume you already have your blog site up and running. The basic idea is that we will created a DVWP in the blog site, make a few manual edits to it, and then copy it into a page in another site. One note: I&#8217;m a bit more of a hack, so I would shortcut past a few of these steps. I&#8217;m trying to make it very straightforward and involving as little manual coding as possible.</p>
<h2>Step 1: Create the DVWP</h2>
<p>Open the blog site with SharePoint Designer. The home page of the blog site is default.aspx, so make a copy of that page and edit it in Advanced Mode. You&#8217;ll want to use the Design View or Split View for this. Enjoy them now, as they are gone in SharePoint Designer 2013!</p>
<p>On the ribbon, choose Insert / Data View / Empty Data View. If you choose a list at this point, you&#8217;ll end up with an XLV Web Part instead, which won&#8217;t work for our purposes because they cannot pull information from other sites – only DVWPs are good for this. Click on the &#8216;Click here to select a data source&#8217; link and choose the Posts list.</p>
<p style="text-align: center;"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/04/image1.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb1.png?resize=440%2C240" border="0" data-recalc-dims="1" /></a></p>
<p>Add whatever columns you&#8217;d like to display in your DVWP as a Multiple Item View. For this example, I&#8217;ve chosen Title, Created, and Created By.</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image2.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb2.png?resize=440%2C235" border="0" data-recalc-dims="1" /></a></p>
<p>Right click on the Title column and choose Format item as / Hyperlink to / Display form. The link will have a hard-coded URL, which is bad, but remember we&#8217;re just doing the basics here. It&#8217;ll work to get you to the actual post for the other site.</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image3.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb3.png?resize=440%2C212" border="0" data-recalc-dims="1" /></a></p>
<p>Make whatever other changes you&#8217;d like in the DVWP (Paging, Item Limits, column formatting, etc.), save the page, and test it in the browser. You should see your DVWP where you inserted it in the page. Mine is right up top:</p>
<p style="text-align: center;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image4.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb4.png?resize=440%2C175" border="0" data-recalc-dims="1" /></a></p>
<h2>Step 2: Modify the DVWP&#8217;s DataSource</h2>
<p>Once you have the DVWP showing what you&#8217;d like to see, we have a couple more things we need to do to the DVWP to make it work in the other site.</p>
<p>Somewhere in the code for the DVWP, you&#8217;ll see the DataSources section. It&#8217;ll look something like this, depending on how you&#8217;ve formatted the DVWP:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;DataSources&gt;
  &lt;SharePoint:SPDataSource runat=&quot;server&quot; DataSourceMode=&quot;List&quot; UseInternalName=&quot;true&quot; UseServerDataFormat=&quot;true&quot; selectcommand=&quot;&amp;lt;View&amp;gt;&amp;lt;/View&amp;gt;&quot; id=&quot;dataformwebpart1&quot;&gt;
    &lt;SelectParameters&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;ListID&quot; ParameterKey=&quot;ListID&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;{AEC1CA2C-EFA6-4218-A742-5939F94E0DDE}&quot;/&gt;
      &lt;asp:Parameter Name=&quot;StartRowIndex&quot; DefaultValue=&quot;0&quot;/&gt;
      &lt;asp:Parameter Name=&quot;nextpagedata&quot; DefaultValue=&quot;0&quot;/&gt;
      &lt;asp:Parameter Name=&quot;MaximumRows&quot; DefaultValue=&quot;10&quot;/&gt;
    &lt;/SelectParameters&gt;
    &lt;DeleteParameters&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;ListID&quot; ParameterKey=&quot;ListID&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;{AEC1CA2C-EFA6-4218-A742-5939F94E0DDE}&quot;/&gt;
    &lt;/DeleteParameters&gt;
    &lt;UpdateParameters&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;ListID&quot; ParameterKey=&quot;ListID&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;{AEC1CA2C-EFA6-4218-A742-5939F94E0DDE}&quot;/&gt;
    &lt;/UpdateParameters&gt;
    &lt;InsertParameters&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;ListID&quot; ParameterKey=&quot;ListID&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;{AEC1CA2C-EFA6-4218-A742-5939F94E0DDE}&quot;/&gt;
    &lt;/InsertParameters&gt;
  &lt;/SharePoint:SPDataSource&gt;
&lt;/DataSources&gt;
</pre>
<p>We need to add the WebURL parameter, as I describe in my older post <a title="Using a DataSource in a Data View Web Part (DVWP) in a Different Site in SharePoint Designer 2010" href="http://sympmarc.com/2010/11/02/using-a-datasource-in-a-data-view-web-part-dvwp-in-a-different-site-in-sharepoint-designer-2010/" target="_blank">Using a DataSource in a Data View Web Part (DVWP) in a Different Site in SharePoint Designer 2010</a>. You should use the relative path to the blog site as the value. In my case, it&#8217;s &#8220;/sites/demos/blog&#8221;.</p>
<p>The end result should be something like this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;DataSources&gt;
  &lt;SharePoint:SPDataSource runat=&quot;server&quot; DataSourceMode=&quot;List&quot; UseInternalName=&quot;true&quot; UseServerDataFormat=&quot;true&quot; selectcommand=&quot;&amp;lt;View&amp;gt;&amp;lt;/View&amp;gt;&quot; id=&quot;dataformwebpart1&quot;&gt;
    &lt;SelectParameters&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;ListName&quot; ParameterKey=&quot;ListName&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;Posts&quot;/&gt;
      &lt;WebPartPages:DataFormParameter Name=&quot;WebURL&quot; ParameterKey=&quot;WebURL&quot; PropertyName=&quot;ParameterValues&quot; DefaultValue=&quot;/sites/demos/blog/&quot;/&gt;
      &lt;asp:Parameter Name=&quot;StartRowIndex&quot; DefaultValue=&quot;0&quot;/&gt;
      &lt;asp:Parameter Name=&quot;nextpagedata&quot; DefaultValue=&quot;0&quot;/&gt;
      &lt;asp:Parameter Name=&quot;MaximumRows&quot; DefaultValue=&quot;10&quot;/&gt;
    &lt;/SelectParameters&gt;
  &lt;/SharePoint:SPDataSource&gt;
&lt;/DataSources&gt;
</pre>
<p>Note that you can delete the DeleteParameters, UpdateParameters, and InsertParameters sections because we&#8217;re only displaying data in the DWP (SelectParameters are used for that).</p>
<p>You&#8217;ll also need to remove the listname attribute in the DVWP header, which will look something like this:</p>
<p><code>listname="{AEC1CA2C-EFA6-4218-A742-5939F94E0DDE}"</code></p>
<p>Save the page again and test it in the browser. Nothing should have changed and the DVWP should be working just fine.</p>
<h2>Step 3: Export the DVWP</h2>
<p>I usually just copy and paste the DVWP code from one SharePoint Designer window to the other, but here we&#8217;re going to use the Export / Import mechanisms instead.</p>
<p>You should already have the page open, so simply click in the upper right corner of the DVWP and choose Export.</p>
<p style="text-align: center;"><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/04/image5.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb5.png?resize=440%2C153" border="0" data-recalc-dims="1" /></a></p>
<p>In IE(, I get this prompt</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/04/image6.png"><img style="background-image: none; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb6.png?resize=440%2C46" border="0" data-recalc-dims="1" /></a></p>
<p>and I just choose to save the Posts.webpart file somewhere I&#8217;ll be able to find it again.</p>
<h2>Step 4: Import the DVWP into the Other Site</h2>
<p>Now we&#8217;ll add the DVWP to the other site. Navigate to the page where you&#8217;d like to display the DVWP, and put the page into Edit Mode. Position the cursor where you&#8217;d like the DVWP and on the ribbon, choose Insert / Web Part.</p>
<p>I&#8217;m going to add mine right under the intro text on a Team Site. You&#8217;ll see that there&#8217;s an option to Upload a Web Part, which I&#8217;ve highlighted below. Click on that, browse the the Posts.webpart file you saved in Step 3, and then click upload.</p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image7.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb7.png?resize=440%2C327" border="0" data-recalc-dims="1" /></a></p>
<p>You&#8217;ll have to reply to a prompt to save the page and then you&#8217;ll be right back at the page without your DVWP. What? Yeah, some bad UI here. But you should see a new Category called Imported Web Parts, and your Posts Web Part should be listed there. (I uploaded twice by accident in the screen grab below, but you get the idea.) You can insert the Posts DVWP wherever you&#8217;d like in the page.</p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image8.png"><img class="aligncenter" style="border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 0px; margin-bottom: 0px; display: inline; background-image: none;" title="image" alt="image" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/04/image_thumb8.png?resize=329%2C279" border="0" data-recalc-dims="1" /></a></p>
<p>As I mentioned, you can also copy and paste the DVWP code from one page to another, depending on your comfort level.</p>
<h2>Next Steps</h2>
<p>Now your users can read blog info wherever you&#8217;d like to display it, without going to the blog site itself. If you&#8217;d like to, you can format the posts anyway you&#8217;d like in the DVWP, of course. To keep things simple, I&#8217;m just displaying some basic info in a list-oriented view. You could mimic the display from the blog site or anything else that tickles your fancy.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=LVODt7CXNmw:6fTsVVoeivk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/LVODt7CXNmw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/06/displaying-blog-posts-in-different-sites-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/04/06/displaying-blog-posts-in-different-sites-in-sharepoint-2010/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=displaying-blog-posts-in-different-sites-in-sharepoint-2010</feedburner:origLink></item>
		<item>
		<title>Working Title: Black Magic Solutions for White Hat SharePoint</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/mnXvqwQzyXg/</link>
		<comments>http://sympmarc.com/2013/04/04/working-title-black-magic-solutions-for-white-hat-sharepoint/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 17:41:18 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[EndUserSharePoint.com]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16813</guid>
		<description><![CDATA[Here&#8217;s something really exciting. I&#8217;m one of nine authors for an upcoming SharePoint book we&#8217;re putting together with Mark Miller (@EUSP), good old Mr. EndUserSharePoint himself. It&#8217;s going to be all about using script with SharePoint in interesting and (we hope!) useful ways. As with our SharePoint 2010 at Work: Tricks, Traps, and Bold Opinions book, we&#8217;re each &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/04/04/working-title-black-magic-solutions-for-white-hat-sharepoint/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Here&#8217;s something really exciting. I&#8217;m one of nine authors for an upcoming SharePoint book we&#8217;re putting together with Mark Miller (<a title="@EUSP" href="http://twitter.com/EUSP" target="_blank">@EUSP</a>), good old Mr. <a title="NothingButSharePoint.com" href="http://nothingbutsharepoint.com/" target="_blank">EndUserSharePoint</a> himself. It&#8217;s going to be all about using script with SharePoint in interesting and (we hope!) useful ways.</p>
<p>As with our <a href="&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=madansbl-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1449321003&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;" target="_blank">SharePoint 2010 at Work: Tricks, Traps, and Bold Opinions</a> book, we&#8217;re each going to write a chapter about something we think is a really cool thing to do in SharePoint using JavaScript and/or jQuery to make it sing.</p>
<p>We&#8217;re going a non-traditional route with this book. It&#8217;s going to come together very fast and we&#8217;re going to publish it ourselves. Thanks go to Mark for both the original idea and the willingness to do a lot of the legwork to get things rolling.</p>
<p>The nine authors who are contributing to the book are: Chris Beckett, Dave Coleman, Josh McCarty, Wendy Neal, Eric Overfield, Peter Serzo, Paul Tavares, Ben Tedder, et moi. I&#8217;m pleased as punch to be a member of this group; every single one of the others has impressed me over the years with their talents and passion for that thing we call SharePoint.</p>
<p>Here&#8217;s my chapter&#8217;s working abstract. Maybe all the lessons I&#8217;ve learned about writing script in SPServices can help people out.</p>
<blockquote><p>To many traditional SharePoint developers, working with JavaScript feels like taking giant steps backward into the Wild West of coding. While it can take some getting used to, nothing could be farther from the truth. By applying good coding practices to your JavaScript and jQuery work, you can devise solid, reusable script libraries to run huge pieces of the SharePoint functionality across your enterprise.</p>
<p>Drawing on the lessons learned from building and maintaining SPServices over four years and across three SharePoint versions, I&#8217;ll give you some tips and tricks about how to build better code and to make your life easier in the meantime. Whether you are in an enterprise of one or 100,000, the same good practices can get you where you need to be.</p></blockquote>
<p>We&#8217;re really excited about it and we have some ideas that we think you&#8217;ll truly be interested in. But guess what? You can get in on the fun! We&#8217;re looking for some reviewers from the community to help us validate the solutions we&#8217;re writing about and make the final product as good as it can possibly be. If you&#8217;re interested, head on over to the <a href="http://eusp-jquerysolutions.eventbrite.com/#" target="_blank">Eventbrite page</a> and sign up.</p>
<p>If you don&#8217;t think you can help out by playing a reviewer role, then you can watch our progress on Twitter with <a title="#SPWhiteHats" href="https://twitter.com/search/realtime?q=%23SPWhiteHats&amp;src=typd" target="_blank">#SPWhiteHats</a>.</p>
<p>Here are some more details from the Eventbrite page to tickle your fancy:</p>
<blockquote><p><strong>How would you like to participate in the creation of a new book? </strong></p>
<p>Nine experienced authors from NothingButSharePoint got together and decided we want to self-publish a unique SharePoint book without having to go through the formal process of a traditional publisher. We want to do a solutions based book where people can select projects of interest to them. We don&#8217;t want a bunch of geek speak; just real world solutions that people can use to enhance their SharePoint sites.</p>
<p><strong>That&#8217;s where you come in.</strong></p>
<p>Each author will be writing one chapter for the book. We want the book to be as compelling as possible, so we need reviewers from the community to act as proof-readers and copy editors for each of the chapters. You will work with a selected author to review their work, test their solutions, and give feedback for possible enhancements. Each of the solutions are described below.</p>
<p>Your obligation? Look at the chapter from a users perspective and let the author know:</p>
<ul>
<li>Does the solution work?</li>
<li>Is it something you would consider using?</li>
<li>Are there extensions to the solution that you would find interesting?</li>
<li>Does the language flow, does it have correct syntax?</li>
</ul>
<div>We are interested in people who want to participate in an author&#8217;s project, You may select multiple chapters to review, but <strong>priority is given to those who select one single chapter.</strong> If the chapter you would like to review is full, you will see a &#8220;Sold Out&#8221; or &#8220;N/A&#8221; sign next to the chapter.</div>
<div></div>
<div>The first draft of the chapters will be finished on April 30th. You will work with the author during the draft period and then help with testing the final code and demos during the first week of May.</div>
<div></div>
<p><strong>What&#8217;s in it for you?</strong></p>
<p>What you&#8217;ll get for your efforts is twofold. First, you will be listed in the credits of the book as a technical reviewer for the project. Second, you&#8217;ll have pre-release access to a chapter of the book.</p>
<p>The solutions will be built and demoed in a SharePoint 2010 environment, but most chapters will also talk about how to implement them in 2013, when appropriate.</p>
<p>How does that sound? If you&#8217;ve got the time and the inclination, check out the abstracts, select one chapter you&#8217;d like to review and let&#8217;s get started. If the chapter you&#8217;d like to select is marked with &#8220;Sold Out&#8221; or &#8220;N/A&#8221;, that means we have enough reviewers for that chapter.</p></blockquote>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=mnXvqwQzyXg:gMOGQIddQoM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/mnXvqwQzyXg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/04/04/working-title-black-magic-solutions-for-white-hat-sharepoint/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/04/04/working-title-black-magic-solutions-for-white-hat-sharepoint/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=working-title-black-magic-solutions-for-white-hat-sharepoint</feedburner:origLink></item>
		<item>
		<title>Using Git with SPServices on Codeplex</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/_TblkMOEt3E/</link>
		<comments>http://sympmarc.com/2013/03/28/using-git-with-spservices-on-codeplex/#comments</comments>
		<pubDate>Thu, 28 Mar 2013 13:56:58 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16802</guid>
		<description><![CDATA[This git thing gets a lot of press these days and I figure it&#8217;s time to learn it. I selected git as the code repo on the SPServices Codeplex site quite a while ago but never used it. Now I&#8217;m trying to figure out what would be useful. SPServices has been a single file, as most of &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/28/using-git-with-spservices-on-codeplex/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://git-scm.com/"><img class="size-full wp-image-16803 alignright" alt="gitlogo@2x" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/gitlogo@2x.png?resize=220%2C92" data-recalc-dims="1" /></a>This <a title="git" href="http://git-scm.com/" target="_blank">git</a> thing gets a lot of press these days and I figure it&#8217;s time to learn it. I selected git as the code repo on the <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices Codeplex</a> site quite a while ago but never used it. Now I&#8217;m trying to figure out what would be useful.</p>
<p>SPServices has been a single file, as most of you know. However, each release has been made up of two js files (one minified, one not) and a license.txt, all in a ZIP file.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-28-2013-09-54-44.jpg"><img class="aligncenter size-full wp-image-16804" alt="SPServices 0.7.2 Release" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-28-2013-09-54-44.jpg?resize=440%2C143" data-recalc-dims="1" /></a>I&#8217;d like to be able to use git to:</p>
<ul>
<li>Accept code from others and easily (relatively) merge it</li>
<li>Track changes better than I have been just on my hard drive and in my WSS 3.0 development environment</li>
<li>Provide offline documentation &#8211; This is a tricky one because I&#8217;ve used the Documentation wiki on Codeplex as my repository and I&#8217;m not sure how to pull the content out.</li>
<li>What else?</li>
</ul>
<p>I welcome any thoughts you may have. I&#8217;m especially interested in how you think I can best accomplish the bullets about with a minimum of muss and fuss for everyone.</p>
<p>Paul Tavares (<a title="@paul_tavares" href="http://twitter.com/paul_tavares" target="_blank">@paul_tavares</a>) has already started a <a href="http://spservices.codeplex.com/discussions/438323#post1022398" target="_blank">thread on the SPServices Discussions</a> to get the ball rolling. Please jump in with your ideas or comment here.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=_TblkMOEt3E:eAVio6b6De4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/_TblkMOEt3E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/28/using-git-with-spservices-on-codeplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/28/using-git-with-spservices-on-codeplex/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-git-with-spservices-on-codeplex</feedburner:origLink></item>
		<item>
		<title>Using _spPageContextInfo to Determine the Current SharePoint Context in Script</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/GiNjSQonScM/</link>
		<comments>http://sympmarc.com/2013/03/26/using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script/#comments</comments>
		<pubDate>Tue, 26 Mar 2013 14:06:42 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16784</guid>
		<description><![CDATA[Sahil Malik had an extremely useful little post about a month back that I emailed to myself and then promptly forgot. Today, Mikael Svenson pointed back to Sahil&#8217;s in a post of his own that is also very useful. I&#8217;m going to steal a little from both posts for this one. I hope Sahil and Mikael don&#8217;t &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/26/using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Sahil Malik had an extremely useful little post about a month back that I emailed to myself and then promptly forgot. Today, Mikael Svenson pointed back to Sahil&#8217;s in a post of his own that is also very useful. I&#8217;m going to steal a little from both posts for this one. I hope Sahil and Mikael don&#8217;t mind. I&#8217;ll ask for forgiveness later.</p>
<p>Mikael&#8217;s trick shows you <a href="http://techmikael.blogspot.com/2013/03/an-easy-way-to-accomplish-home.html">An easy way to accomplish Home navigation links regardless of the path of your site collection</a> just by looking at a JavaScript variable that SharePoint provides us. Knowing the current context is something I struggled with when I first was working on <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a>, and I came up with some monkey business with the <a title="WebUrlFromPageUrl" href="http://spservices.codeplex.com/wikipage?title=WebUrlFromPageUrl" target="_blank">WebUrlFromPageUrl</a> operation in the Webs Web Service and some other URL hackery to figure it out. Since then, I&#8217;ve layered in checks for some of the variables that SharePoint 2010 provides to avoid Web Service calls, where possible. In the upcoming 2013.01 release, I&#8217;ll add in a few more, and even some that take advantage of some of the additional variables in SharePoint 2013. Of course, there will be fallbacks for anything that isn&#8217;t available, so the library continues to be version-resistant.</p>
<p>Mikael linked back to Sahil&#8217;s post <a href="http://blah.winsmarts.com/2013-2-_sppagecontextinfo_is_your_new_best_friend.aspx" target="_blank">_spPageContextInfo is your new best friend</a>. In Sahil&#8217;s post, he lists the values which are available in SharePoint 2010 and 2013 in every page. Here&#8217;s the table that Sahil provides, but I&#8217;ve sorted the data alphabetically and changed the example URL to make some of the values more clear. It&#8217;s worth noting that there isn&#8217;t an SP2007 column in Sahil&#8217;s table. That&#8217;s because the _spPageContextInfo variable wasn&#8217;t introduced until SharePoint 2010. For SharePoint 2007, it&#8217;s still monkey business and URL hackery. After all, no one uses script with SharePoint 2007, right?</p>
<p>Assuming we are on the page https://sharepoint.com/sites/demos/SitePages/Home.aspx</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>2013-03-27 &#8211; Added L_Menu_BaseUrl for SharePoint 2007 based on Christophe&#8217;s helpful comment below.</div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<th>Name</th>
<th>SP2007</th>
<th>SP2010</th>
<th>SP2013</th>
<th>Example Value</th>
</tr>
<tr>
<td>alertsEnabled</td>
<td></td>
<td>X</td>
<td>X</td>
<td>false</td>
</tr>
<tr>
<td>allowSilverlightPrompt</td>
<td></td>
<td>X</td>
<td>X</td>
<td>true</td>
</tr>
<tr>
<td>clientServerTimeDelta</td>
<td></td>
<td></td>
<td>X</td>
<td>17856</td>
</tr>
<tr>
<td>crossDomainPhotosEnabled</td>
<td></td>
<td></td>
<td>X</td>
<td>true</td>
</tr>
<tr>
<td>currentCultureName</td>
<td></td>
<td></td>
<td>X</td>
<td>en-US</td>
</tr>
<tr>
<td>currentLanguage</td>
<td></td>
<td>X</td>
<td>X</td>
<td>1033</td>
</tr>
<tr>
<td>currentUICultureName</td>
<td></td>
<td></td>
<td>X</td>
<td>en-US</td>
</tr>
<tr>
<td>L_Menu_BaseUrl</td>
<td>X</td>
<td> X</td>
<td>X</td>
<td>/Sites/Demos</td>
</tr>
<tr>
<td>layoutsUrl</td>
<td></td>
<td></td>
<td>X</td>
<td>_layouts/15</td>
</tr>
<tr>
<td>pageItemId</td>
<td></td>
<td>X</td>
<td>X</td>
<td>1</td>
</tr>
<tr>
<td>pageListId</td>
<td></td>
<td>X</td>
<td>X</td>
<td>GUID</td>
</tr>
<tr>
<td>pagePersonalizationScope</td>
<td></td>
<td></td>
<td>X</td>
<td>1</td>
</tr>
<tr>
<td>serverRequestPath</td>
<td></td>
<td></td>
<td>X</td>
<td>/Sites/Demos/SitePages/Home.aspx</td>
</tr>
<tr>
<td>siteAbsoluteUrl</td>
<td></td>
<td></td>
<td>X</td>
<td>http://sharepoint.com</td>
</tr>
<tr>
<td>siteClientTag</td>
<td></td>
<td></td>
<td>X</td>
<td>21$$15.0.4454.1026</td>
</tr>
<tr>
<td>siteServerRelativeUrl</td>
<td></td>
<td></td>
<td>X</td>
<td>/sites/Demos</td>
</tr>
<tr>
<td>systemUserKey</td>
<td></td>
<td></td>
<td>X</td>
<td>1:0).w|&lt;sid&gt;</td>
</tr>
<tr>
<td>tenantAppVersion</td>
<td></td>
<td></td>
<td>X</td>
<td>0</td>
</tr>
<tr>
<td>userId</td>
<td></td>
<td>X</td>
<td>X</td>
<td>30</td>
</tr>
<tr>
<td>webAbsoluteUrl</td>
<td></td>
<td></td>
<td>X</td>
<td>http://sharepoint.com/sites/demos</td>
</tr>
<tr>
<td>webLanguage</td>
<td></td>
<td>X</td>
<td>X</td>
<td>1033</td>
</tr>
<tr>
<td>webLogoUrl</td>
<td></td>
<td></td>
<td>X</td>
<td>_layouts/15/images/siteicon.png</td>
</tr>
<tr>
<td>webPermMasks</td>
<td></td>
<td></td>
<td>X</td>
<td>Object with properties High &amp; Low</td>
</tr>
<tr>
<td>webServerRelativeUrl</td>
<td></td>
<td>X</td>
<td>X</td>
<td>/Sites/Demos</td>
</tr>
<tr>
<td>webTemplate</td>
<td></td>
<td></td>
<td>X</td>
<td>1</td>
</tr>
<tr>
<td>webTitle</td>
<td></td>
<td></td>
<td>X</td>
<td>Demos</td>
</tr>
<tr>
<td>webUIVersion</td>
<td></td>
<td>X</td>
<td>X</td>
<td>4 (2010) or 15 (2013)</td>
</tr>
</tbody>
</table>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=GiNjSQonScM:AbOHN6p2qS0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/GiNjSQonScM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/26/using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/26/using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-_sppagecontextinfo-to-determine-the-current-sharepoint-context-in-script</feedburner:origLink></item>
		<item>
		<title>SPServices and Migration to SharePoint 2013</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/bv5PEmQy1bE/</link>
		<comments>http://sympmarc.com/2013/03/25/spservices-and-migration-to-sharepoint-2013/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 16:26:02 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16769</guid>
		<description><![CDATA[I get many great questions in the SPServices Discussions (that&#8217;s the best place to ask questions about SPServices, IMHO, not the MSDN forums, or StackExchange, or on the Documentation pages on the SPServices site, where I rarely see them). Some of them deserve to get wider exposure by becoming a blog post, and here is one of &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/25/spservices-and-migration-to-sharepoint-2013/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I get many great questions in the <a title="SPServices Discussions" href="http://spservices.codeplex.com/discussions" target="_blank">SPServices Discussions</a> (that&#8217;s the best place to ask questions about SPServices, IMHO, not the MSDN forums, or StackExchange, or on the Documentation pages on the SPServices site, where I rarely see them). Some of them deserve to get wider exposure by becoming a blog post, and here is one of those.</p>
<p>The question came in today from <a href="http://www.codeplex.com/site/users/view/jshoaf">jshoaf</a> and was titled <a title="Migration to SharePoint 2013" href="http://spservices.codeplex.com/discussions/437650" target="_blank">Migration to SharePoint 2013</a>:</p>
<blockquote><p>I&#8217;m new to SPServices and I&#8217;m using it to develop on SharePoint 2010.  I&#8217;m using SPServices 0.7.2.  My organization will be upgrading to SharePoint 2013 sometime in the future.  What will I need to do (if anything) when the new SharePoint server is installed to keep using the SPServices library?  Primarily I&#8217;m using GetListItems and Query operations.</p></blockquote>
<p>and here is my answer:</p>
<blockquote><p>Unfortunately, the answer will have to be the dreaded &#8220;it depends&#8221;.</p>
<p>The SOAP Web Services are still present in SharePoint 2013, though Microsoft has decided to deprecate them. What that will mean in reality is anyone&#8217;s guess. There are lots of deprecated pieces of functionality (think sandbox) that would very difficult to remove.</p>
<p>The bigger question is around what you do with the results and such. The DOM in SharePoint 2013 has changed, just as it did from 2007 to 2010. If your code is nice and modular and you are using clean selectors, I would guess that you will have to re-test, perhaps adjust the code, and most likely adjust the CSS.</p>
<p>Keep in mind that many of the adjustments may be outside SPServices itself and just in your own jQuery / JavaScript and CSS.</p></blockquote>
<p>The upshot of this is that there simply can&#8217;t be a simple answer. The core of SPServices will work in 2013. My testing hasn&#8217;t been extensive enough to test every single operation, but the SOAP Web Services are there in 2013 and they work the same.</p>
<p>As for the value-added functions, it looks like the list forms in 2013 are essentially the same as in 2010 and even 2007. It&#8217;s mind-boggling, isn&#8217;t it? One would think &#8211; at least I do - that there were so many opportunities for improvement.  I was extremely surprised when this was the case going from 2007 to 2010, and I&#8217;m incredulous that the forms are the same going from 2010 to 2013. But so it is.</p>
<p>The good news about having those frumpy forms stay the same is that the value-added functions that enhance them will generally work. Again, my testing hasn&#8217;t been extensive, but the functions everyone know and love &#8211; <a title="SPCascadeDropdowns" href="http://spservices.codeplex.com/wikipage?title=$().SPServices.SPCascadeDropdowns" target="_blank">SPCascadeDropdowns</a> being the primary one &#8211; seem to work fine. Of course, the whole iitem creation and editing expereience has been widened so that there are more possible ways to accomplish them.</p>
<p>Another question I often get is &#8220;Have you rewritten SPServices for 2013?&#8221; The answer for that is &#8220;no&#8221;, as there isn&#8217;t really any need, based on the details above. However, if you decide to use SPServices with SharePoint 2013 and you run into issues, I *definitely* want to hear about them &#8211; post to the <a title="SPServices Discussions" href="http://spservices.codeplex.com/discussions" target="_blank">SPServices Discussions</a>. I think SPServices has a good few years left in it, and I don&#8217;t want there to be bugs with 2013 or 2007 or 2010 if I&#8217;m able to fix them.</p>
<p>I&#8217;m in the midst of working on a new release of SPServices that will return jQuery <a title=".Deferred()" href="http://api.jquery.com/category/deferred-object/" target="_blank">.Deferred()</a> objects (aka promises) from SPServices calls. (See <a title="SPServices 2013.01ALPHA4 Returns a Deferred Object (Promise)" href="http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/">SPServices 2013.01ALPHA4 Returns a Deferred Object (Promise)</a>) One of the reasons I&#8217;m doing this is that it will bring SPServices forward to reflect better coding practices if or when you may decide to move to REST-based calls to SharePoint instead of using SPServices to make SOAP calls. In other words, even if you decide to stick with SPServices, you&#8217;ll be using an approach that will make it easier to move forward with SharePoint as it evolves.</p>
<p>Remember that SPServices is open source. I rely on you, the community that uses it, to let me know what works and what doesn&#8217;t. There is just not enough time in a day for me to test everything. If I hear about problems, I try to get fixes out as soon as I can, but this is free software, folks. The best situation is one where someone runs into a problem, they devise a fix, and I get the fix to incorporate into future versions. That was my understanding about open source when I got started with SPServices in 2009, but in reality, it just isn&#8217;t true most of the time. Wouldn&#8217;t it be nice if it were, though?</p>
<p>If you have thoughts or concerns about all this, by all means let me know, preferably in the <a title="SPServices Discussions" href="http://spservices.codeplex.com/discussions" target="_blank">SPServices Discussions</a>. (Have I mentioned that is the best place to get help with SPServices) Comments here are always welcome as well.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>This is what I&#8217;m talkin&#8217; about! This afternoon, I got a request for functionality along with the proposed fix. Take a look at the <a href="http://spservices.codeplex.com/workitem/10132" target="_blank">Add support to allow SPUpdateMultipleListItems to use folders</a> item in the Issue Tracker. I&#8217;m adding it into the new alpha for the <a title="SPServices 2013.01" href="http://spservices.codeplex.com/releases/view/92552" target="_blank">2013.01 release</a> right away. This is how you can get what you&#8217;d like to see in SPServices, for sure.</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=bv5PEmQy1bE:lD8arD02G3M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/bv5PEmQy1bE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/25/spservices-and-migration-to-sharepoint-2013/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/25/spservices-and-migration-to-sharepoint-2013/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-and-migration-to-sharepoint-2013</feedburner:origLink></item>
		<item>
		<title>MicroWork Is Just Work By a Smaller Name – Or Is It MicroHell?</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/OJO4lqtfQb0/</link>
		<comments>http://sympmarc.com/2013/03/23/microwork-is-just-work-by-a-smaller-name-or-is-it-microhell/#comments</comments>
		<pubDate>Sat, 23 Mar 2013 15:55:18 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[microhell]]></category>
		<category><![CDATA[microwork]]></category>
		<category><![CDATA[social business]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16771</guid>
		<description><![CDATA[David Broussard put up an interesting post on his blog the other day called MicroWork Is Just Work By Smaller Name. In the post, David says: This is the promise of Social Business, or as I like to call it MicroWorking. When I am standing in line at the grocery store, I am often on &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/23/microwork-is-just-work-by-a-smaller-name-or-is-it-microhell/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>David Broussard put up an interesting post on his blog the other day called <a title="MicroWork Is Just Work By Smaller Name" href="http://blogs.catapultsystems.com/dbroussard/archive/2013/03/19/microwork-is-just-work-by-smaller-name.aspx" target="_blank">MicroWork Is Just Work By Smaller Name</a>. In the post, David says:</p>
<blockquote><p>This is the promise of Social Business, or as I like to call it MicroWorking. When I am standing in line at the grocery store, I am often on my Smart Phone reading emails, or on Facebook, or Texting with someone…in short I am doing something in what was previously unusable time. This is the real potential of MicroWork or Social Business…turning unproductive time into productive time…especially when we are not at our desks.</p>
<ul>
<li>Sitting in a conference room waiting for a meeting to start</li>
<li>Walking from one part of the building to another</li>
<li>Waiting in the lunch line</li>
<li>Walking from the car to the office</li>
<li>Getting a cup of coffee at the Starbucks</li>
</ul>
<p>These are times that are often unproductive that can be made productive via MicroWork. What can we do in those time frames?</p>
<ul>
<li>Approve invoices</li>
<li>Enter a timesheets</li>
<li>Review a document</li>
<li>Answer a question</li>
<li>Delegate a task to another person</li>
</ul>
<p>You get the idea…the idea here is to figure out a bit of work that can be performed and turn it into a MicroWork task. In this manner we accomplish two very important things. First we make our workers more productive and second giving them work in a format that is easy to use and fits in with their lives.</p></blockquote>
<p>I would recommend reading the entire post, as it&#8217;s quite interesting; this is just the tail end of it.</p>
<p>After reading the post, I was moved to add my $.02.</p>
<blockquote><p>MicroWork is absolutely the current state of things, at least among my social circles (both words in their traditional meanings). I think it&#8217;s yet to be seen if or when there will be a backlash to this filling in all of the nooks and crannies of our time.</p>
<p>I know that my days now often feel too full. There&#8217;s precious little time I can set aside for self-reflection or family time where I don&#8217;t have my iPhone in my pocket. It&#8217;s become a bit of a crack high to pull it out of my pocket to see what&#8217;s going on with Facebook, Twitter, Yammer, email, etc. (in no particular order).</p>
<p>This is a microhell of my own doing of course.I could simply choose to shut it all off, but that gets harder all the time, as our work and &#8220;social&#8221; lives intertwine. One could posit that we are giving up too much of ourselves for the perceived benefit of others &#8211; a constant striving to belong in too many places.</p>
<p>The other downside I see is that work and non-work now coexist in microbursts. We are devoting increasingly smaller time slices with our attention to any particular &#8220;social&#8221; activity. If things like approving an invoice are in the &#8220;social&#8221; mix, are we paying enough attention to the details to make an informed decision? Or are those important (they are important if we need to do them, correct?) decisions becoming relegated to the importance level of clicking a &#8220;Like&#8221; button?</p>
<p>This new world order is undoubtedly here to stay in some form. Time will show us how it evolves from where it is, regardless what the tool makers would like to see us do.</p></blockquote>
<p>In his response to my comment (also very worth reading), David recommended the book <a title="Hamlet's BlackBerry: A Practical Philosophy for Building a Good Life in the Digital Age" href="http://www.amazon.com/gp/product/B003MVZ5RC/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B003MVZ5RC&amp;linkCode=as2&amp;tag=madansbl-20" target="_blank">Hamlet&#8217;s BlackBerry: A Practical Philosophy for Building a Good Life in the Digital Age</a>. It&#8217;s already on my Kindle, ready to go.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=OJO4lqtfQb0:P1N0CxqYBPs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/OJO4lqtfQb0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/23/microwork-is-just-work-by-a-smaller-name-or-is-it-microhell/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/23/microwork-is-just-work-by-a-smaller-name-or-is-it-microhell/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microwork-is-just-work-by-a-smaller-name-or-is-it-microhell</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #12 – SharePoint and jQuery SPServices in Education: A Case Study</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/SJjci8UuIxs/</link>
		<comments>http://sympmarc.com/2013/03/21/spservices-stories-12-sharepoint-and-jquery-spservices-in-education-a-case-study/#comments</comments>
		<pubDate>Thu, 21 Mar 2013 20:25:26 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16765</guid>
		<description><![CDATA[This entry is part 12 of 13 in the series SPServices StoriesIntroduction Ben Tedder (@bentedder) has long been a fan of SPServices and his writing about it is great, to boot. I liked this post back when Ben first put it up on his blog because it really does tell a story, and SPServices plays a &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/21/spservices-stories-12-sharepoint-and-jquery-spservices-in-education-a-case-study/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 12 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Ben Tedder (<a title="@bentedder" href="http://twitter.com/bentedder" target="_blank">@bentedder</a>) has long been a fan of <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> and his writing about it is great, to boot. I liked <a href="http://www.bentedder.com/sharepoint-jquery-spservices-education-a-case-study/" target="_blank">this post</a> back when Ben first put it up on his blog because it really does tell a story, and SPServices plays a significant role in it.</p>
<p>Ben has built quite a few real-world solutions using SPServices that transcend what SharePoint can do. By using SharePoint as the back end data repository, Ben has managed to create solutions that provide a great user experience and are far more efficient than SharePoint can be when building through the UI. He does this without deploying any server-side code, just as I always aspire to do. Great solutions with minimal footprints.</p>
<p>Thanks to Ben for letting me republish this post from his blog.</p>
<h2>SharePoint and jQuery SPServices in Education: A Case Study</h2>
<div>24 Sep 2012</div>
<p><img class="size-full wp-image-16766 alignright" alt="bentedder-profile" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/bentedder-profile.jpg?resize=300%2C187" data-recalc-dims="1" /></p>
<div>This is a morphed, updated, renewed version of the <a title="SharePoint Scheduling Assistant (built with jQuery Mobile and SPServices)" href="http://www.bentedder.com/sharepoint-scheduling-assistant-built-with-jquery-mobile-and-spservices/">SharePoint Scheduling Assistant</a>. I’m not releasing this version quite yet, but this is a brief case study on how it’s working at a specific school.</p>
<h3>Business Needs</h3>
<p>The International School of Beijing needed a way for Elementary School parents to book time slots with teachers during bi-annual parent-teacher conferences.</p>
<p>The requirements:</p>
<ul>
<li>Easy to use (training is impossible).</li>
<li>Integrate into the current intranet portal.</li>
<li>Sync with the database to omit any kind of manual setup for secretaries.</li>
<li>Deny parents the ability to book more than one slot with the same teacher.</li>
<li>Allow parents to book the same slot for two different teachers (in case mother and father come in and meet with 1 teacher each to save time)</li>
<li>If two or more parents are online at the same time, correctly queue the submissions so a double booking does not occur.</li>
<li>Allow teachers to pre-block out slots where parents cannot book times.</li>
<li>Allow teachers the ability to see their entire schedule, including which student is coming in during which time slot.</li>
</ul>
<h3>Solution (SharePoint, jQuery, and SPServices)</h3>
<p>A SharePoint solution was built with jQuery to meet the requirements of the Elementary School. Let’s break down how the solution was created:</p>
<h4>Part 1 – SharePoint</h4>
<p>Within SharePoint three lists were created:</p>
<ul>
<li>Bookings (Each reservation had its own row in this list that stored the details of who booked it, for which teacher, etc.)</li>
<li>Time Slots (A pre-determined list of time slots…in this case a list item was created for each 20 minute time slot from 12-6pm on Thursday and Friday Oct 18 and 19).</li>
<li>People (An external content type that pulled records from the database for each student, each of their parents, and each of their teacher names)</li>
</ul>
<p>One of the trickier parts of this solution was grabbing the external content from the database in a usable way. Once it was in, we were able to work with the data. However, this list has 10,000+ items, so dealing with larger data like this was quite challenging. Enter jQuery.</p>
<h4>Part 2 – jQuery and SPServices</h4>
<p>The bulk of this solution was created with the jQuery and jQuery SPServices Libraries. Using jQuery, we stepped through the process like this:</p>
<ol>
<li>Get the details of the logged in user (parent) using SPServices</li>
<li>Hit the SharePoint external data list once, filter it by Parent (matching to the Parent login ID), and store it in a javascript object for later use. This was the biggest strain on the system. We minimized the data call to only one time, but even still, pulling a list of 10,000 records even once isn’t super quick.</li>
<li>Get all the children of the logged in parent, push them to a drop-down menu<br />
<select>
<option selected="selected">Child 1</option>
<option>Child 2</option>
</select>
</li>
<li>Get all the teachers of the selected child from #3, push them to another drop-down menu<br />
<select>
<option selected="selected">Teacher 1</option>
<option>Teacher 2</option>
<option>Teacher 3</option>
</select>
</li>
<li>Get all time slots from the <strong>Time Slots</strong> list, push to a third drop-down menu<br />
<select>
<option selected="selected">(Thu. Oct 18) 12:00pm – 12:20pm</option>
<option>(Thu. Oct 18) 12:20pm – 12:40pm</option>
<option>(Thu. Oct 18) 12:40pm – 1:00pm</option>
</select>
</li>
<li>Retroactively <em>disable</em> all time slot options that have already been booked (by searching through the <strong>Bookings</strong> list for records that match the time slot and the selected teacher)<br />
<select>
<option disabled="disabled">(Thu. Oct 18) 12:00pm – 12:20pm</option>
<option selected="selected">(Thu. Oct 18) 12:20pm – 12:40pm</option>
<option>(Thu. Oct 18) 12:40pm – 1:00pm</option>
</select>
</li>
</ol>
<p>Once the data was present, the parent could interact with it in two ways, <strong>book</strong>, and <strong>delete</strong>.</p>
<p>To book a time slot, the selected child, selected teacher, and selected time slot (along with a comments area) was submitted and saved to the list. To delete a time slot, a delete button is appended to each reservation in the on-screen schedule with the ID of the reservation as the ID of the link element.</p>
<p>The data from the Bookings list is checked once during the time slot selection process, and again during the form submit process to make sure no double bookings have occurred.</p>
<h3>Benefits</h3>
<p>This solution enables, for the first time at this school, parents to go online and manage their entire Parent-Teacher Conference schedule. Also, as an added bonus, if a mother and father both login, they can see the complete schedule for their child, even if only one of the parents made the bookings.</p>
<p>Once a parent books a time slot, they receive an email containing the details of their reservation.</p>
<p>An additional feature of this solution was that it was duplicated and tweaked for teachers to use a similar interface to pre-block out time slots where they did not want parents to come (ie, lunch, coffee break, going home). In that scenario the “one-block” restriction was removed for teachers, allowing them to customize when parents would be given the option to come in.</p>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=SJjci8UuIxs:fCIc2vw7lBw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/SJjci8UuIxs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/21/spservices-stories-12-sharepoint-and-jquery-spservices-in-education-a-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/03/21/spservices-stories-12-sharepoint-and-jquery-spservices-in-education-a-case-study/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-12-sharepoint-and-jquery-spservices-in-education-a-case-study</feedburner:origLink></item>
		<item>
		<title>The SharePoint Social vs. Yammer Battle – Do We Care?</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/CqKRg20ZHdM/</link>
		<comments>http://sympmarc.com/2013/03/18/the-sharepoint-social-vs-yammer-battle-do-we-care/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 19:28:51 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Gartner]]></category>
		<category><![CDATA[social]]></category>
		<category><![CDATA[Yammer]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16753</guid>
		<description><![CDATA[I&#8217;m driven to write this post after reading one by James Dellow over the weekend called Gartner: Yammer or SharePoint? The choice is still unclear. The choice indeed may still seem unclear, but I think that the statement addresses the wrong questions. In my opinion (I&#8217;m the only one here &#8211; you talkin&#8217; to me?), we should stop &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/18/the-sharepoint-social-vs-yammer-battle-do-we-care/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m driven to write this post after reading one by <a title="View all posts by James Dellow" href="http://rippleffectgroup.com/author/jamesdellowreg/" rel="author">James Dellow</a> over the weekend called <a title="Gartner: Yammer or SharePoint? The choice is still unclear" href="http://rippleffectgroup.com/2013/03/15/gartner-yammer-or-sharepoint-the-choice-is-still-unclear/" target="_blank">Gartner: Yammer or SharePoint? The choice is still unclear</a>.</p>
<p>The choice indeed may still seem unclear, but I think that the statement addresses the wrong questions.</p>
<p>In my opinion (I&#8217;m the only one here &#8211; you talkin&#8217; to me?), we should stop talking about the &#8220;social&#8221; thing as a thing. Christian Buckley (<a title="@buckleyplanet" href="http://twitter.com/buckleyplanet" target="_blank">@buckleyplanet</a>) beat me to the punch in his comment on the post:</p>
<blockquote><p>Part of the problem here is that we are still dealing with a serious learning curve on what social is, exactly, and how it fits into an organization’s culture and business needs. Microsoft needs to both education and evangelize a vision+roadmap that has not yet been articulated. That’s a tough row to hoe.</p></blockquote>
<p>Rather than saying we should use SharePoint or Yammer for &#8220;social&#8221;, we should instead be talking about the specific things that we want people in a given population to be doing (or at least capable of doing – getting them to do it is a different challenge).</p>
<p>Once we understand what that might look like – and the goals will vary greatly by organization – we can start to make intelligent decisions about the right technologies for that particular case. Saying we need “social” means basically nothing. Or anything. Or something in between.</p>
<p>The slide that James showed from the <a title="Gartner webinar" href="http://blogs.gartner.com/larry-cannell/2013/03/08/webinar-whats-new-in-sharepoint-2013-and-yammer-for-social-software/" target="_blank">Gartner webinar</a> which prompted *his* post (and no, I did not see the webinar) starts to get at that set of questions, but I would say that it is still from the reverse angle. It&#8217;s useful, but it isn&#8217;t the point.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/workloads-yammer-vs-sp-from-gartner.png"><img class="aligncenter size-full wp-image-16754" alt="workloads-yammer-vs-sp-from-gartner" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/workloads-yammer-vs-sp-from-gartner.png?resize=440%2C324" data-recalc-dims="1" /></a></p>
<p>This sort of tool-driven analysis almost always leads to disappointment in my experience. It&#8217;s an easy way out for those who don&#8217;t want to do the harder work of understanding what the organization actually needs &#8211; and maybe even wants &#8211; by saying that this tool or that tool is the better one without clearly understanding the underlying problems in the first place.</p>
<p>Technologies can only support the kind of things that people are lumping under the social sobriquet to a certain degree. The concept of being social covers many things, but note that none of them mention SharePoint or Yammer:</p>
<blockquote><p>so·cial [soh-shuhl] adjective (from <a title="social" href="http://dictionary.reference.com/browse/social" target="_blank">Dictionary.com</a>)<br />
1. pertaining to, devoted to, or characterized by friendly companionship or relations: a social club.<br />
2. seeking or enjoying the companionship of others; friendly; sociable; gregarious.<br />
3. of, pertaining to, connected with, or suited to polite or fashionable society: a social event.<br />
4. living or disposed to live in companionship with others or in a community, rather than in isolation: People are social beings.<br />
5. of or pertaining to human society, especially as a body divided into classes according to status: social rank</p></blockquote>
<p>I&#8217;ve already stopped saying &#8220;social&#8221; as much as I can &#8211; which isn&#8217;t easy - opting instead to push people to tell me what they want to accomplish. It makes most of them uncomfortable (or they say &#8220;You know, *social*), but in the long run these artificial packaging exercises are the wrong way to go.</p>
<p>Decide what you want to do, then decide which tool is the best match to solve that set of problems.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=CqKRg20ZHdM:bYEmO17CoUU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/CqKRg20ZHdM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/18/the-sharepoint-social-vs-yammer-battle-do-we-care/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/18/the-sharepoint-social-vs-yammer-battle-do-we-care/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-sharepoint-social-vs-yammer-battle-do-we-care</feedburner:origLink></item>
		<item>
		<title>MetaVis SharePoint MVP Webinars Series – Creating a Great User Experience in SharePoint</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/AiRHSnhXqhk/</link>
		<comments>http://sympmarc.com/2013/03/14/metavis-sharepoint-mvp-webinars-series-creating-a-great-user-experience-in-sharepoint/#comments</comments>
		<pubDate>Thu, 14 Mar 2013 18:26:34 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[MetaVis]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16726</guid>
		<description><![CDATA[Dave Coleman (@davecoleman146davecoleman146) and I had a grand time &#8211; Dave and I always seem to have a grand time &#8211; with the webinar we did yesterday. It was part of the MetaVis SharePoint MVP Webinars Series and I presented Creating a Great User Experience in SharePoint. It was somewhat a reprise of my SPTechCon &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/14/metavis-sharepoint-mvp-webinars-series-creating-a-great-user-experience-in-sharepoint/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://metavistech.com"><img class="aligncenter" alt="" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2011/09/MetavisLogo.png?resize=343%2C83" data-recalc-dims="1" /></a></p>
<p>Dave Coleman (<a title="@davecoleman146" href="http://twitter.com/davecoleman146" target="_blank">@davecoleman146</a>davecoleman146) and I had a grand time &#8211; Dave and I always seem to have a grand time &#8211; with the webinar we did yesterday. It was part of the <a title="MetaVis SharePoint MVP Webinars Series" href="http://metavistech.com/webinars" target="_blank">MetaVis SharePoint MVP Webinars Series</a> and I presented <a title="Creating a Great User Experience in SharePoint" href="http://metavistech.com/webinar/creating-great-user-experience-sharepoint" target="_blank">Creating a Great User Experience in SharePoint</a>. It was somewhat a reprise of my <a title="SPTechCon" href="http://sptechcon.com" target="_blank">SPTechCon</a> session from San Francisco a few weeks ago, but with some tweaks and additions based on the feedback I got afterward. (One of the benefits of doing a session multiple times is that I get to refine it as I go.)</p>
<p>Thanks go out to Dave and the MetaVis team for giving me this opportunity to present.</p>
<p>My slides are available on SlideShare.<br />
<iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/17174863?rel=0" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="margin-bottom: 5px;"><strong> <a title="Metavis Webinar- Creating a Great User Experience in SharePoint" href="http://www.slideshare.net/sympmarc/metavis-webinar-creating-a-great-user-experience-in-sharepoint" target="_blank">Metavis Webinar- Creating a Great User Experience in SharePoint</a> </strong> from <strong><a href="http://www.slideshare.net/sympmarc" target="_blank">Marc D Anderson</a></strong></div>
<p>And here&#8217;s the video:<br />
<iframe style="overflow: hidden;" name="tsc_player" src="http://www.screencast.com/users/MetaVis/folders/Webinar Series/media/2a32ae2c-f9cd-4f5f-afd0-b75149e504fd/embed" height="356" width="427" allowfullscreen="" frameborder="0" scrolling="no"></iframe></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=AiRHSnhXqhk:lxnuK-yAfCw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/AiRHSnhXqhk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/14/metavis-sharepoint-mvp-webinars-series-creating-a-great-user-experience-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/14/metavis-sharepoint-mvp-webinars-series-creating-a-great-user-experience-in-sharepoint/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=metavis-sharepoint-mvp-webinars-series-creating-a-great-user-experience-in-sharepoint</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #11 – Using SPServices and jQuery to Perform a Redirect from a SharePoint List NewForm to EditForm</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/IdrVHvGndMg/</link>
		<comments>http://sympmarc.com/2013/03/12/spservices-stories-11-using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/#comments</comments>
		<pubDate>Wed, 13 Mar 2013 03:30:43 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[NewForm.aspx]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16569</guid>
		<description><![CDATA[This entry is part 11 of 13 in the series SPServices StoriesIntroduction I ran across this SPServices Story in a post on the blog at CTS. The author of the post, Matt Ingle, is a Senior Consultant at CTS in Birmingham, AL. According to Matt, he is a team lead for a group called the SharePoint Factory. &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/12/spservices-stories-11-using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 11 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>I ran across this <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> Story in a <a href="http://blogs.askcts.com/2013/02/18/using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/" target="_blank">post</a> on the blog at <a title="CTS" href="http://askcts.com/" target="_blank">CTS</a>. The author of the post, Matt Ingle, is a Senior Consultant at CTS in Birmingham, AL. According to Matt, he is a team lead for a group called the SharePoint Factory. The SharePoint Factory team roles correspond to the various areas of the SharePoint family of products. This role-based approach allows for technical depth and specialization within the SharePoint functional areas.</p>
<p>SPServices has a function called <a title="SPRedirectWithID" href="http://spservices.codeplex.com/wikipage?title=$().SPServices.SPRedirectWithID" target="_blank">SPRedirectWithID</a>, but it&#8217;s problematic in SharePoint 2010 due to the dialogs that SharePoint uses to show the list forms. You can ensure that the function works just fine by turning off the dialogs, but that&#8217;s not always desirable. I&#8217;d turn them all off if I had my druthers because most list forms require more screen real estate than the dialogs provide without a lot of scrolling. They also don&#8217;t obviate the need for a ca-chunk postback when you save the item.</p>
<p>Given this state of things, Matt came up with a way to accomplish a similar thing in a different way. Here&#8217;s Matt&#8217;s take on the task. It&#8217;s a nice way to go if your information architecture is very clear and you know that your forms won&#8217;t change much, if at all, since Matt is bypassing the simple NewForm we get for &#8220;free&#8221; from SharePoint. On the other hand, this type of approach may become more common as we move forward with SharePoint and HTML5 compatibility.</p>
<h2>Using SPServices and jQuery to Perform a Redirect from a SharePoint List NewForm to EditForm</h2>
<h5>By Matt Ingle<a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/Matt20Ingle_thumb.jpg"><img class="alignright size-full wp-image-16653" alt="Matt Ingle" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/Matt20Ingle_thumb.jpg?resize=127%2C127" data-recalc-dims="1" /></a></h5>
<p><strong>Problem:</strong> In SP 2010, you have a parent list and multiple child lists connected through Lookup columns. You have created the custom Display and Edit forms for the parent list containing XsltListView web parts for the child lists filtered through query string view parameters. Refer to <a href="https://www.nothingbutsharepoint.com/sites/eusp/Pages/setting-sharepoint-form-fields-using-query-string-variables-without-using-javascript.aspx">this article</a> for more information on this solution.</p>
<p>Now you need a way to redirect the user from the NewForm to the EditForm after saving the parent list item while passing the newly created item ID as a query string parameter. The problem is there is no way to do this out-of-the-box (OOB).</p>
<p><strong>Solution:</strong> You can use <a href="http://jquery.com/">jQuery</a> and the <a href="http://spservices.codeplex.com/">SPServices library from CodePlex</a> to utilize SharePoint’s Web Services. The two operations I will use in the following example are <a href="http://msdn.microsoft.com/en-us/library/ms774637.aspx">GetUserInfo</a> and <a href="http://spservices.codeplex.com/wikipage?title=UpdateListItems&amp;referringTitle=Lists">UpdateListItems</a>.</p>
<p><strong>Note: </strong>Be sure to read the IMPORTANT NOTES on the SPServices Home page about supported versions. This example will use the (“[nodeName='z:row']“) syntax which no longer works with jQuery 1.7. I will be using jQuery 1.6.2 and SPServices 0.6.2 in my example. However, if you want to use 1.7, an alternative solution to using this syntax can be found <a href="http://www.steveworkman.com/html5-2/javascript/2011/improving-javascript-xml-node-finding-performance-by-2000/">here by Steve Workman</a>. [ed: Use the SPFilterNode function, which will work with any version of jQuery: <code>.SPFilterNode("z:row")</code> and ensures cross-browser compatibility.]</p>
<p>By using the SPServices operation to create the new list item you will be bypassing the OOB Save process for the SharePoint list form. This means that you will lose the validation on the form and will need to create your own validation logic using jQuery. In the following example I will be implementing the required field validation for my list fields.</p>
<p><strong>Example: </strong>At this point you should already have a custom NewForm for your parent list.</p>
<p>Below each field to be displayed on the form, add some text wrapped in a &lt;span&gt; tag with unique ids that will be used to display our custom validation message. I worded mine the same as the text displayed by SharePoint. Notice my id for the &lt;span&gt; tag below is ‘valBU’. We will use jQuery later to select this element by the id.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image0024.jpg"><img class="aligncenter size-full wp-image-16654" alt="clip_image0024" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image0024.jpg?resize=440%2C308" data-recalc-dims="1" /></a></p>
<p>Additionally, we will need to add a custom button to our form in place of the OOB Save button. This will allow us to attach our custom code to the Save button’s click event.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image004.jpg"><img class="aligncenter size-full wp-image-16656" alt="clip_image004" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image004.jpg?resize=440%2C280" data-recalc-dims="1" /></a></p>
<p>Next, add a Content Editor WebPart (CEWP) directly below the DataFormWebPart. This will hold our jQuery/SPServices script.</p>
<p>In the CEWP, add the script references to the jQuery and SPServices libraries. I uploaded mine in a new ‘Scripts’ folder stored in the ‘Style Library’ folder so that it is accessible to other pages in the site as needed.</p>
<p>To begin the script, add code to hide the text containing our custom validation messages. Place this code in the $(document).ready function. Next, add a line to attach the method CreateNewItem to the Save button’s click event.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image006.jpg"><img class="aligncenter size-full wp-image-16657" alt="clip_image006" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image006.jpg?resize=440%2C106" data-recalc-dims="1" /></a></p>
<p>Next, we can implement our custom validation logic. The following method will be called in our CreateNewItem method to validate our form before creating the new item. It starts by using jQuery selectors to obtain the values of the list fields on the form. We can use the ‘title’ attribute for the selectors which contains the name of the list field. In my example, I have 2 drop-down list boxes so I am looking for select elements. For a normal text field you would look for input elements.</p>
<p>For a PeoplePicker, the selector used is a little different. There are different ways to obtain this value, but for our purposes (looking for a single PeoplePicker on the page) you can just look for a textarea element with the title ‘People Picker’. If you have multiple PeoplePickers on the form then you would need to research a way to be more selective. [ed: You can use the <a title="SPFindPeoplePicker" href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPFindPeoplePicker" target="_blank">SPFindPeoplePicker</a> function in SPServices for this.]</p>
<p>When you have an empty PeoplePicker value you will get ’&amp;#160;’ which is the HTML code for a non-breaking space. Simply check for this value versus an empty string as done for the other fields.</p>
<p>This method counts the number of empty fields and toggles display of the custom validation messages. If there are no empty required fields then it returns true, false otherwise.</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image008.jpg"><img class="aligncenter size-full wp-image-16658" alt="clip_image008" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image008.jpg?resize=440%2C383" data-recalc-dims="1" /></a></p>
<p>Now we can implement the CreateNewItem method. First, use jQuery to select the form fields and obtain the values.</p>
<p>Again, we need to do something different for the PeoplePicker. The value of the PeoplePicker contains a lot of stuff we don’t really need so we have to parse through it to find the user login name.</p>
<p>With this value stored in the ‘buFinContollerPerson’ variable, we will supply it to the ‘userLoginName’ parameter for the GetUserInfo operation. This will be a value like ‘EXT\mingle’.</p>
<p>We are calling the GetUserInfo operation in order to get the correct format needed to save the PeoplePicker value to the list. This format is ’37;#Matt Ingle’ (<em>&lt;UserID&gt;;#&lt;UserName&gt;</em>).</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image010.jpg"><img class="aligncenter size-full wp-image-16659" alt="clip_image010" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image010.jpg?resize=440%2C333" data-recalc-dims="1" /></a></p>
<p>To complete the CreateNewItem method we will call the UpdateListItems method. To specify the creation of a new list item you need to specify “New” for the batchCmd parameter. In addition, supply the list display name (one shown in UI) for the listName parameter. The values to be submitted for the new list item are specified as value pairs in the valuepairs parameter.</p>
<p><strong>Note:</strong>We are supplying the fullUserName obtained from the GetUserInfo operation as the value for the PeoplePicker field BUFinContollerPerson.</p>
<p>Once the operation has completed we will parse the XML response to find the newly created item ID. This is where we use the (“[nodeName='z:row']“) syntax. This value is supplied for the ID query string parameter to redirect the user to the EditForm.</p>
<p>Also notice the &lt;div&gt; tag below the &lt;script&gt; tag. This is where you can specify the location of the debug output for the SPServices operations. Simply uncomment the calls to SPDebugXMLHttpResult to see the operation results displayed. Be sure to comment out the redirect though when debugging, otherwise you will not stay on the page to see the results. :-)</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image012.jpg"><img class="aligncenter size-full wp-image-16660" alt="clip_image012" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/clip_image012.jpg?resize=440%2C238" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=IdrVHvGndMg:DkfAEkiqwJY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/IdrVHvGndMg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/12/spservices-stories-11-using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/03/12/spservices-stories-11-using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-11-using-spservices-and-jquery-to-perform-a-redirect-from-a-sharepoint-list-newform-to-editform</feedburner:origLink></item>
		<item>
		<title>SPTechCon Social Demo</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/hFiRbWh3Xa8/</link>
		<comments>http://sympmarc.com/2013/03/11/sptechcon-social-demo/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 15:54:33 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[LeapHQ]]></category>
		<category><![CDATA[LeapMessages]]></category>
		<category><![CDATA[SPTechCon]]></category>
		<category><![CDATA[TweetDeck]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[Yammer]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16629</guid>
		<description><![CDATA[It&#8217;s not every day that I get to create something in SharePoint with a Magic button. I few weeks ago, Mark Miller pinged me asking if I&#8217;d be interested in helping him with a demo for his keynote at SPTechCon. When Mark asks, I tend to ask &#8220;how high&#8221; simply because it&#8217;s usually something fun. &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/11/sptechcon-social-demo/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p></p>
<p class="first-p">Mark Miller (<a href="http://twitter.com/EUSP">@EUSP</a>) and I did a webinar on Friday, March 15, 2013 at  to show the demo again and take questions about how we built it. If you&#8217;d like to look at the demo yourself, check out the <a href="https://www.nothingbutsharepoint.com/sites/eusp/MarcAnderson/SPTechConSocialDemo.aspx" target="_blank">publicly available page on NothingButSharePoint.com</a>. The video is embedded below.</p>
<p></div>
<p><span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='440' height='278' src='http://www.youtube.com/embed/YkBHIZBcWjA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>It&#8217;s not every day that I get to create something in SharePoint with a Magic button.</p>
<p style="text-align: center;"><img class="aligncenter size-full wp-image-16630" alt="Magic Button" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-8-2013-16-58-03.jpg?resize=85%2C29" data-recalc-dims="1" /></p>
<p>I few weeks ago, Mark Miller pinged me asking if I&#8217;d be interested in helping him with a demo for his keynote at <a href="http://www.sptechcon.com/SanFrancisco2013/">SPTechCon</a>. When Mark asks, I tend to ask &#8220;how high&#8221; simply because it&#8217;s usually something fun. Sometimes, it&#8217;s even useful.</p>
<p>The basic idea was to show a social dashboard in SharePoint without letting on that we were using SharePoint. As you might imagine, none of this went along as linearly as I&#8217;m going to describe it. We tried various different things, added and removed columns, and widgets, etc. What I&#8217;ll describe is the end result.</p>
<p>First, I knew I wanted to use jQuery, jQueryUI, and SPServices, so I took a copy of default.aspx in a basic Team Site and added the following references. (Yes, I prefer the old Web Part Page over the Wiki pages. It&#8217;s much easier to work with. The Wiki pages tend to vomit markup all over what I do.)</p>
<pre class="brush: xml; title: ; notranslate">
&lt;link href=&quot;Scripts/social_home_page.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;!-- Reference the jQueryUI theme's stylesheet on the Google CDN. Here we're using the &quot;Start&quot; theme --&gt;
&lt;link href=&quot;/ajax/libs/jqueryui/1.10.0/themes/start/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;
&lt;!-- Reference jQuery on the Google CDN --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/ajax/libs/jquery/1.8.3/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- Reference jQueryUI on the Google CDN -- &gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- Reference SPServices on cdnjs (Cloudflare) --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;/ajax/libs/jquery.SPServices/0.7.2/jquery.SPServices-0.7.2.min.js&quot;&gt;&lt;/script&gt;
&lt;!--&lt;script type=&quot;text/javascript&quot; src=&quot;http://cdn.dev.skype.com/uri/skype-uri.js&quot;&gt;&lt;/script&gt;--&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;Scripts/social_home_page.js&quot;&gt;&lt;/script&gt;</pre>
<p>Next, I altered the markup for the page in SharePoint Designer. This was a demo, so there was zero concern about repeatability, of course. It&#8217;s nice to have that sort of freedom once in a while. By default, the page has a table with two columns set to 70% (left) and 30% (right) width. I simply changed that markup to have four columns, each with 25% width. In each of the two new table columns, I added a Web Part Zone. I wanted to drop as much of the social stuff as I could into the page using Content Editor Web Parts so that I could explain it more easily, like in this blog post. In edit mode, the page looked something like this: <a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-09-52-09.jpg"><img class="aligncenter size-full wp-image-16676" alt="3-11-2013 09-52-09" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-09-52-09.jpg?resize=440%2C279" data-recalc-dims="1" /></a> Next I added some CSS to the social_home_page.css file:</p>
<pre class="brush: css; title: ; notranslate">
#s4-ribbonrow {
  display:none;
}
.s4-titlerowhidetitle {
  display:none;
}
#s4-leftpanel {
  display:none;
}
#MSO_ContentTable {
  margin-left:0;
}
#MSO_ContentTable table td {
  padding:3px;
}
</pre>
<p>This simple CSS removed all of the chrome we normally see on the page. In other words, we&#8217;ve removed the SharePoint from SharePoint to a large degree. The ribbon, title area, and Quick Launch are all totally hidden. (No screen shot for this &#8211; you wouldn&#8217;t see anything!) At this point, I had a page that looked like a big white nothing in the browser. Time to add the fun stuff. In Twitter, you can create widgets that display tweets from Twitter much like you can create different streams in HootSuite or TweetDeck. You can find this capability in Settings: <a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-09-58-00.jpg"><img class="size-full wp-image-16678 aligncenter" alt="3-11-2013 09-58-00" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-09-58-00.jpg?resize=313%2C429" data-recalc-dims="1" /></a> I created three different widgets:</p>
<ul>
<li>search stream for &#8220;EUSP&#8221;</li>
<li>search stream for &#8220;SPTechCon&#8221;, and</li>
<li>search stream for &#8220;SharePoint&#8221;</li>
</ul>
<p>There are a few settings which give you basic control over the look and feel. If we were implementing this &#8220;for real&#8221;, it would probably make sense to make calls against the Twitter API and get the raw data so that we would have full control over the markup and visuals.<a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-05-29.jpg"><img class="aligncenter size-full wp-image-16680" alt="3-11-2013 10-05-29" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-05-29.jpg?resize=440%2C290" data-recalc-dims="1" /></a> When you create the widget, you get a little snippet of markup and script which you can embed in a Web page. Those snippets are very simple. Here&#8217;s what the snippet for EUSP looks like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;a class=&quot;twitter-timeline&quot; href=&quot;https://twitter.com/search?q=EUSP&quot; data-widget-id=&quot;306449761781817344&quot;&gt;&lt;/a&gt;
&lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=&quot;//platform.twitter.com/widgets.js&quot;;fjs.parentNode.insertBefore(js,fjs);}}(document,&quot;script&quot;,&quot;twitter-wjs&quot;);&lt;/script&gt;
</pre>
<p>I put each snippet into a TXT file so that I could reference them in CEWPs. For the EUSP stream, I have a TXT file called twitter_search_eusp.txt in a Document library, and I just point to that file in the CEWP&#8217;s Content Link. This gets the three Twitter streams into the page:</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-25-53.jpg"><img class="aligncenter size-full wp-image-16684" alt="3-11-2013 10-25-53" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-25-53.jpg?resize=440%2C282" data-recalc-dims="1" /></a></p>
<p>We also wanted to show something from Yammer, since it plays so importantly into Microsoft&#8217;s social story. While there are Yammer Web Parts available, I decided to go the widget route here as well. If you look under Apps in the Yammer Web interface, you&#8217;ll find Yammer Embed, which eventually takes you to the <a title="Yammer Embed" href="https://www.yammer.com/company/embed" target="_blank">Yammer Embed</a> page. There, you&#8217;ll find a PDF document that explains how to embed a Yammer feed. (Note to the Yammer folks: This isn&#8217;t a very clear process. Opportunity for improvement.)</p>
<p>Here&#8217;s what I ended up with for the <a href="https://www.yammer.com/spyam/">SPYam</a> feed. Note that I created my own id for the container so that it would fit into my page logic easily.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script data-app-id=&quot;hyB2pTvrL36Y50py8EWj6A&quot; src=&quot;https://assets.yammer.com/platform/yam.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
yam.connect.embedFeed({
  container: '#yammer-spyam-embedded-feed',
  network: 'spyam' // update with your own
});
&lt;/script&gt;
&lt;div id=&quot;yammer-spyam-embedded-feed&quot;&gt;&lt;/div&gt;
</pre>
<p>For some reason, the Yammer authentication mechanism simply won&#8217;t work in my page in Internet Explorer 9, so I switched to Firefox at this point, where I had no problems. (Another place for improvement, Yammer folks. However, it may well be that my IE9 is just sick.)</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-43-14.jpg"><img class="aligncenter size-full wp-image-16686" alt="3-11-2013 10-43-14" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-10-43-14.jpg?resize=440%2C256" data-recalc-dims="1" /></a></p>
<p>Now we have all four streams we want in the page, at least in Firefox, for me.</p>
<p>I had seen some Twitter traffic about Dan McPherson&#8217;s lastest entries in the SharePoint Games under the <a href="https://www.leaphq.com/">Leap</a> moniker. There are two offerings right now: LeapBackup and LeapMessages. Mark and I thought it would be cool if we could use LeapMessages to send a text message with the contents of a Tweet. I can imagine several use cases for this. Perhaps you work at Burger King, your Twitter account is hacked, and you need to notify the execs&#8230;</p>
<p>LeapMessages is really simple to implement. You just sign up on the Leap site, give the site URL and your Office365 credentials (it only works on Office365 right now), and Leap creates a list in your site called LeapMessages. If you add an item to that list, the LeapMessages engine grabs it (it polls every 30 seconds) and sends it out as a text from their gateway. Easy-peasy.</p>
<p>To implement this, I pulled a demo cheat. Since it takes a little time to load up the three Twitter streams and the Yammer stream, I set it up so that when I hovered over the Magic button (see below for more info on the button), this script would run, adding an SMS link at the bottom of each tweet in the three streams. I just had to wait until the three Twitter streams were loaded before I did the hover trick.</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;div.showSharePoint&quot;).hover(function () {

  if (!loadedSMS) {

    loadedSMS = true;

    $(&quot;iframe[id^='twitter-widget-']&quot;).contents().find(&quot;ul.tweet-actions&quot;).prepend(&quot;&lt;ul&gt;&lt;li&gt;&lt;a class=&quot;SMS-send&quot;&gt;SMS&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&quot;);
    $(&quot;iframe[id^='twitter-widget-']&quot;).contents().find(&quot;.SMS-send&quot;).click(function (e) {

      e.preventDefault();
      var thisTweet = $(this).closest(&quot;div.footer&quot;).closest(&quot;li&quot;);
      var thisTweetText = thisTweet.find(&quot;div.e-entry-content&quot;).text().trim();
      var thisTweetFullName = thisTweet.find(&quot;div.header span.full-name&quot;).text().trim();
      var thisTweetNickName = thisTweet.find(&quot;div.header span.p-nickname&quot;).text().trim();
      messageText.val(&quot;Interesting tweet from &quot; + thisTweetFullName + &quot; (&quot; + thisTweetNickName + &quot;) &quot; + thisTweetText);
      countChars();

      $(&quot;#dialog&quot;).dialog(&quot;open&quot;);

    });
  }

}, function () {
  // Nothing to do
});
</pre>
<p>I added this markup at the bottom of the page for the dialog that would pop up when I clicked the SMS links.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;dialog&quot; title=&quot;Send SMS Message&quot;&gt;
  &lt;p class=&quot;validateTips&quot;&gt;All fields are required.&lt;/p&gt;
  &lt;head&gt;
    &lt;meta name=&quot;WebPartPageExpansion&quot; content=&quot;full&quot; /&gt;
  &lt;/head&gt;
  &lt;form&gt;
    &lt;fieldset&gt;
    &lt;label for=&quot;phoneNumber&quot;&gt;Phone Number&lt;/label&gt;+1
    &lt;input type=&quot;text&quot; name=&quot;phoneNumber&quot; id=&quot;phoneNumber&quot;
    class=&quot;text ui-widget-content ui-corner-all&quot; /&gt;
    &lt;br /&gt;
    &lt;label for=&quot;messageText&quot;&gt;Message&lt;/label&gt;
    &lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;messageText&quot;
    id=&quot;messageText&quot; value=&quot;&quot;
    class=&quot;text ui-widget-content ui-corner-all&quot;&gt;&lt;/textarea&gt;
    &lt;div id=&quot;charCount&quot;&gt;&lt;/div&gt;&lt;/fieldset&gt;
  &lt;/form&gt;
&lt;/div&gt;

</pre>
<p>When I clicked the SMS link, this script drove the dialog and wrote the entered data into the LeapMessages list using SPServices.</p>
<pre class="brush: jscript; title: ; notranslate">
dialogDiv.dialog({
  autoOpen : false,
  height : 300,
  width : 500,
  modal : true,
  buttons : {
    &quot;Send Message&quot; : function () {
      var bValid = true;
      allFields.removeClass(&quot;ui-state-error&quot;);
      bValid = bValid &amp;&amp; checkLength(phoneNumber, &quot;Phone number&quot;, 10);
      bValid = bValid &amp;&amp; checkRegexp(phoneNumber, /^([0-9])+$/i, &quot;Phone number can only contain digits.&quot;);
      // From jquery.validate.js (by joern), contributed by Scott Gonzalez: http://projects.scottsplayground.com/email_address_validation/
      if (bValid) {
        // Send the SMS message
        $().SPServices({
          operation : &quot;UpdateListItems&quot;,
          async : false,
          batchCmd : &quot;New&quot;,
          listName : &quot;LeapMessages&quot;,
          valuepairs : [
            [&quot;ReceiverMobileNumber&quot;, &quot;+1&quot; + phoneNumber.val()],
            [&quot;Message&quot;, encodeXml(messageText.val())]
          ],
          completefunc : function (xData, Status) {}
        });
        $(this).dialog(&quot;close&quot;);
      }
    },
    Cancel : function () {
      $(this).dialog(&quot;close&quot;);
    }
  },
  close : function () {
    allFields.val(&quot;&quot;).removeClass(&quot;ui-state-error&quot;);
  }
});
</pre>
<p>There are a few helper functions referenced above, and here they are:</p>
<pre class="brush: jscript; title: ; notranslate">
var loadedSMS = false;

var dialogDiv = $(&quot;#dialog&quot;);
var phoneNumber = $(&quot;#phoneNumber&quot;),
messageText = $(&quot;#messageText&quot;),
allFields = $([]).add(phoneNumber).add(messageText),
tips = $(&quot;.validateTips&quot;);

function checkLength(o, n, num) {
  if (o.val().length &gt; num || o.val().length &lt; num) {
    o.addClass(&quot;ui-state-error&quot;);
    updateTips(n + &quot; must be  &quot; + num + &quot; digits.&quot;);
    return false;
  } else {
    return true;
  }
}

function checkRegexp(o, regexp, n) {
  if (!(regexp.test(o.val()))) {
    o.addClass(&quot;ui-state-error&quot;);
    updateTips(n);
    return false;
  } else {
    return true;
  }
}

function updateTips(t) {
  tips.text(t).addClass(&quot;ui-state-highlight&quot;);
  setTimeout(function () {
    tips.removeClass(&quot;ui-state-highlight&quot;, 1500);
  }, 500);
}

function countChars() {
  var messageLen = messageText.val().length;
  var errorClass = messageLen &gt; 160 ? &quot;class='ui-state-error'&quot; : &quot;&quot;;
  $(&quot;#charCount&quot;).html(&quot;You have used &lt;span &quot; + errorClass + &quot; &gt;&quot; + messageLen + &quot;&lt;/span&gt; of 160 characters&quot;);
}
messageText.keyup(function () {
  countChars();
});
</pre>
<p>I decided to add one last piece of functionality. I couldn&#8217;t figure out how frequent the Twitter polling was, but when there was a new tweet in any any of the streams, I wanted to highlight it. To do this, I added this bit of script. It ran every three seconds to see if anything new had shown up, and if it had, it highlighted the counter at the top of each Twitter stream.</p>
<pre class="brush: jscript; title: ; notranslate">
// Show tweet counters
setInterval(&quot;countTweets()&quot;, 3000);

function countTweets() {
  $(&quot;iframe[id^='twitter-widget-']&quot;).each(function () {
    var tweetCount = $(this).contents().find(&quot;li.tweet&quot;).length;
    var thisCounter = $(this).prev(&quot;.tweet-counter&quot;);
    if (thisCounter.length === 1) {
      var currCount = thisCounter.html();
      if (tweetCount != currCount) {
        thisCounter.addClass(&quot;ui-state-highlight&quot;);
        setTimeout(function () {
          thisCounter.removeClass(&quot;ui-state-highlight&quot;, 1500);
        }, 10000);
      }

      thisCounter.html(tweetCount);
    } else {
      $(this).before(&quot;&lt;div class=&quot;tweet-counter&quot;&gt;&quot; + tweetCount + &quot;&lt;/div&gt;&quot;);
    }
  });
}
</pre>
<p>The Magic button is just a div. Yes, I violated best practices by making it a div instead of a real button. Don&#8217;t try this at home.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;showSharePoint&quot;&gt;Magic&lt;/div&gt;
</pre>
<p>The Magic button contains the reveal. When I clicked on it, this script ran, unveiling the fact that the page was, in fact, a SharePoint page. There were very few oohs or aaahs that I could hear, which was a little disappointing, but hey, maybe I pushed it too fast or something.</p>
<pre class="brush: jscript; title: ; notranslate">
// Set up the Magic button
$(&quot;div.showSharePoint&quot;).click(function () {

  var thisValue = $(this).text();

  if (thisValue == &quot;Magic&quot;) {
    $(&quot;#RibbonContainer&quot;).hide();
    $(&quot;#s4-ribbonrow&quot;).slideDown(5000);
    $(&quot;#RibbonContainer&quot;).slideDown(5000, function () {
      $(this).fadeIn(1000)
    });
    $(&quot;.s4-titlerowhidetitle&quot;).fadeIn(5000);
    $(&quot;#s4-leftpanel&quot;).fadeIn(5000);
    $(&quot;#MSO_ContentTable&quot;).animate({
      &quot;margin-left&quot; : &quot;150px&quot;
    }, 5000, function () {
      // animation complete
    });
    $(this).text(&quot;No Magic&quot;);
  } else {
    $(&quot;#RibbonContainer&quot;).slideUp(5000, function () {
      $(this).fadeOut(1000)
    });
    $(&quot;#s4-ribbonrow&quot;).slideUp(5000);
    $(&quot;.s4-titlerowhidetitle&quot;).slideUp(5000);
    $(&quot;#s4-leftpanel&quot;).hide();
    $(&quot;#MSO_ContentTable&quot;).animate({
      &quot;margin-left&quot; : &quot;0px&quot;
    }, 5000, function () {
      // animation complete
    });
    $(this).text(&quot;Magic&quot;);

  }

});
</pre>
<p>So there you have it. I&#8217;m sure I&#8217;ve left some bits and bobs out of this in trying to make it consumable here, but I think I&#8217;ve gotten most of the important parts. All in good fun, and hopefully it got the message across that SharePoint doesn&#8217;t have to look like SharePoint and that we can do useful social stuff in SharePoint in many cool ways.</p>
<p>I&#8217;ve thought of a few neat things we could do with this, like storing the snippets in a SharePoint list and letting the user select which ones they want to see in their version of the page, dragging and dropping the streams into the order they like, and saving their settings for when they return. The possibilities with this stuff are really endless, depending on what you want to accomplish.</p>
<p>Have fun!</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-11-47-29.jpg"><img class="aligncenter size-full wp-image-16701" alt="3-11-2013 11-47-29" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/03/3-11-2013-11-47-29.jpg?resize=440%2C208" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=hFiRbWh3Xa8:6kUiUHkg1Sk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/hFiRbWh3Xa8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/11/sptechcon-social-demo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/11/sptechcon-social-demo/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sptechcon-social-demo</feedburner:origLink></item>
		<item>
		<title>SPServices 2013.01ALPHA4 Returns a Deferred Object (Promise)</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/F76ujEfjik8/</link>
		<comments>http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/#comments</comments>
		<pubDate>Sat, 09 Mar 2013 19:59:17 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[deferred object]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16636</guid>
		<description><![CDATA[I&#8217;ve just posted a new alpha (ALPHA4) for SPServices 2013.01. This alpha implements the return of a deferred object, aka a promise, as well as executing a completefunc (if provided) for backward compatibility. Note that the deferred object capability was introduced in jQuery 1.5, so this version of SPServices requires that version or greater. I&#8217;ve done &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve just posted a new alpha (ALPHA4) for <a title="SPServices 2013.01" href="http://spservices.codeplex.com/releases/view/92552" target="_blank">SPServices 2013.01</a>. This alpha implements the return of a deferred object, aka a promise, as well as executing a completefunc (if provided) for backward compatibility. Note that the deferred object capability was introduced in jQuery 1.5, so this version of SPServices requires that version or greater. I&#8217;ve done my initial testing with jQuery 1.8.2.</p>
<p>So, what does this mean to you, the SPServices user? Well, in the short term for most of you it may not mean anything unless you understand the first paragraph above. If you do, I could really use some help in testing the deferred object capability.</p>
<p>Here&#8217;s how I&#8217;ve implemented it. There are two big differences in the core SPServices function. First, I&#8217;ve set it up so that it runs a completefunc if one is provided, just has it always has, but also returns a promise. This means the code has gone from this:</p>
<pre class="brush: jscript; title: ; notranslate">
var cachedXML;
var status = null;

if(opt.cacheXML) {
  cachedXML = $(&quot;body&quot;).data(msg);
}

if(cachedXML === undefined) {
  // Make the Ajax call
  $.ajax({
    url: ajaxURL,                      // The relative URL for the AJAX call
    async: opt.async,                    // By default, the AJAX calls are asynchronous.  You can specify false to require a synchronous call.
    beforeSend: function (xhr) {              // Before sending the msg, need to send the request header
      // If we need to pass the SOAPAction, do so
      if(WSops[opt.operation][1]) {
        xhr.setRequestHeader(&quot;SOAPAction&quot;, SOAPAction);
      }
    },
    type: &quot;POST&quot;,                      // This is a POST
    data: msg,                        // Here is the SOAP request we've built above
    dataType: &quot;xml&quot;,                    // We're getting XML; tell jQuery so that it doesn't need to do a best guess
    contentType: &quot;text/xml;charset='utf-8'&quot;,        // and this is its content type
    complete: function(xData, Status) {
      if(opt.cacheXML) {
        $(&quot;body&quot;).data(msg, xData);        // Cache the results
      }
      cachedXML = xData;
      status = Status;
      opt.completefunc(cachedXML, status);        // When the call is complete, do this
    }
  });

} else {
  opt.completefunc(cachedXML, status);            // Call the completefunc
}

</pre>
<p>to this:</p>
<pre class="brush: jscript; title: ; notranslate">
// Check to see if we've already cached the results
var cachedXML;
if(opt.cacheXML) {
  cachedXML = promisesCache[msg];
}

if(typeof cachedXML === &quot;undefined&quot;) {

  // Finally, make the Ajax call
  var spservicesPromise = $.ajax({
    // The relative URL for the AJAX call
    url: ajaxURL,
    // By default, the AJAX calls are asynchronous.  You can specify false to require a synchronous call.
    async: opt.async,
    // Before sending the msg, need to send the request header
    beforeSend: function (xhr) {
      // If we need to pass the SOAPAction, do so
      if(WSops[opt.operation][1]) {
        xhr.setRequestHeader(&quot;SOAPAction&quot;, SOAPAction);
      }
    },
    // Always a POST
    type: &quot;POST&quot;,
    // Here is the SOAP request we've built above
    data: msg,
    // We're getting XML; tell jQuery so that it doesn't need to do a best guess
    dataType: &quot;xml&quot;,
    // and this is its content type
    contentType: &quot;text/xml;charset='utf-8'&quot;,
    complete: function(xData, Status) {
      // When the call is complete, call the completefunc if there is one
      if($.isFunction(opt.completefunc)) {
        opt.completefunc(xData, Status);

      }
    }
  });

  spservicesPromise.then(
    function() {
      // Cache the promise if requested
      if(opt.cacheXML) {
        promisesCache[msg] = spservicesPromise;
      }
    },
    function() {
                                // TODO: Allow for fail function
    }
  );

  // Return the promise
  return spservicesPromise;

} else {
  // Call the completefunc if there is one
  if($.isFunction(opt.completefunc)) {
    opt.completefunc(cachedXML, null);
  }
  // Return the cached promise
  return cachedXML;
}
</pre>
<p>I don&#8217;t usually post the differences in the code in such detail, but I want to get some eyeballs on it so that I can gather yeas or nays on the implementation. I wanted to keep it as clean as possible yet maintain 100% backward capability. I seem to have accomplished both in all of my testing, but I&#8217;d love feedback. I&#8217;m especially curious what folks think I should do in the failure case of the .then() function. In the past I&#8217;ve not done anything, leaving it to the SPServices user to decide what they would like to do. The only two options I can think of are:</p>
<ol>
<li>Add a retry loop to give it a few more shots before giving up</li>
<li>Pop up an error message of some sort</li>
</ol>
<p>Neither of these two options feel right to me. If the .ajax() call fails, in my experience it&#8217;s because the server isn&#8217;t responding 99.9999% of the time. Trying again won&#8217;t usually solve that unless it&#8217;s simply a lag after an IISRESET. Popping up an error doesn&#8217;t really help, either, as it would have to be some sort of generic &#8220;Contact your administrator&#8221; nonsense, which I avoid assiduously. Thoughts?</p>
<p>The second change is that I&#8217;ve moved from using the .data() jQuery function for caching to caching the promises in an array, as you can see in the code above. This difference should be invisible to all end users and to most developers who use SPServices. However, since it means a difference in how the caching works since I introduced it in v0.7.2, I want to be sure that I get people testing that as well.</p>
<p>Finally, as a further test of the deferred object capability, in this alpha the <a title="SPArrangeChoices" href="http://spservices.codeplex.com/wikipage?title=$().SPServices.SPArrangeChoices" target="_blank">SPArrangeChoices</a> function also uses the returned promise for GetList as a test to improve the performance and user experience. This function was a good candidate for the first internal test of the new architecture, as it is relatively straightforward and only makes one Web Services call to GetList. I&#8217;ll be implementing more uses of promises inside the library as it makes sense before finalizing this release.</p>
<p>So if you&#8217;re a hard-core SPServices user, please give this one a test for me. Obviously I&#8217;m interested in any regression, but I&#8217;d also like to know how the returned promises work for you if you can write new calls against this version. As an illustration of how you can use this new capability, here&#8217;s what I&#8217;ve done in SPArrangeChoices:</p>
<pre class="brush: jscript; title: ; notranslate">
// Rearrange radio buttons or checkboxes in a form from vertical to horizontal display to save page real estate
$.fn.SPServices.SPArrangeChoices = function (options) {

  var opt = $.extend({}, {
    listName: $().SPServices.SPListNameFromUrl(),          // The list name for the current form
    columnName: &quot;&quot;,          // The display name of the column in the form
    perRow: 99,            // Maximum number of choices desired per row.
    randomize: false        // If true, randomize the order of the options
  }, options);

  var columnFillInChoice = false;
  var columnOptions = [];
  var out;

  // Get information about columnName from the list to determine if we're allowing fill-in choices
  var thisGetList = $().SPServices({
    operation: &quot;GetList&quot;,
    async: false,
    cacheXML: true,
    listName: opt.listName
  });

  // when the promise is available...
  thisGetList.done(function() {
    $(thisGetList.responseXML).find(&quot;Field[DisplayName='&quot; + opt.columnName + &quot;']&quot;).each(function() {
      // Determine whether columnName allows a fill-in choice
      columnFillInChoice = ($(this).attr(&quot;FillInChoice&quot;) === &quot;TRUE&quot;) ? true : false;
      // Stop looking;we're done
      return false;
    });
[...]
  });
}; // End $.fn.SPServices.SPArrangeChoices
</pre>
<p>Here&#8217;s another chunk of test code that I&#8217;ve been using to see that the caching is working as I&#8217;d like. The Census Data list on my Demos site has over 3000 items in it, so it&#8217;s a good list to test timings with, as it takes a comparatively long time to send the data down the wire. I&#8217;ve got the async option and the completefunc commented out below; you can play around with the combinations here as I have if you&#8217;d like.</p>
<pre class="brush: jscript; title: ; notranslate">
function getIt() {
  var outUl = $(&quot;#WSOutput ul&quot;);

  logTime(outUl, &quot;Start: &quot;);
  var getListItemsPromise = $().SPServices({
    cacheXML: true,
//    async: false,
    operation: &quot;GetListItems&quot;,
    webURL: &quot;/Demos/&quot;,
    listName: &quot;Census Data&quot;
//    completefunc: function (xData, Status) {
//      logTime(outUl, &quot;completefunc: &quot; + $(xData.responseXML).SPFilterNode(&quot;rs:data&quot;).attr(&quot;ItemCount&quot;));
//    }
  });
  logTime(outUl, &quot;End: &quot;);

    getListItemsPromise.done(function() {
    logTime(outUl, &quot;promiseComplete: &quot; + $(getListItemsPromise.responseXML).SPFilterNode(&quot;rs:data&quot;).attr(&quot;ItemCount&quot;));
    });
}

function logTime(o, t) {
  o.append(&quot;&lt;li&gt;&quot; + new Date() + &quot; :: &quot; + t + &quot;&lt;/li&gt;&quot;);
}
</pre>
<p>with this simple markup:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;input type=&quot;button&quot; onclick=&quot;getIt();&quot; value=&quot;Get It&quot;/&gt;
&lt;div class=&quot;ms-vb&quot; style=&quot;width:100%;&quot; id=&quot;WSOutput&quot;&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;
</pre>
<p>Let me know what you think, and stay tuned for more changes in this release, which you can keep track of in the <a title="Issue Tracker" href="http://spservices.codeplex.com/workitem/list/advanced?keyword=&amp;status=Open%2b%28not%2bclosed%29&amp;type=All&amp;priority=All&amp;release=SPServices%2b2013.01&amp;assignedTo=All&amp;component=All&amp;sortField=LastUpdatedDate&amp;sortDirection=Descending&amp;page=0&amp;size=100" target="_blank">Issue Tracker</a>.</p>
<p>Thanks go to Scot Hillier (<a title="@ScotHillier" href="http://twitter.com/ScotHillier" target="_blank">@scothillier</a>) for opening my eyes to the value of deferred objects by showing examples in several of his recent sessions.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=F76ujEfjik8:AQnaYM99nuw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/F76ujEfjik8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/09/spservices-2013-01alpha4-returns-a-deferred-object-promise/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-2013-01alpha4-returns-a-deferred-object-promise</feedburner:origLink></item>
		<item>
		<title>SPTechCon San Francisco 2013 Wrap Up</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/Tcc7Qo-6a08/</link>
		<comments>http://sympmarc.com/2013/03/07/sptechcon-san-francisco-2013-wrap-up/#comments</comments>
		<pubDate>Thu, 07 Mar 2013 18:10:05 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPTechCon]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16610</guid>
		<description><![CDATA[Well, I&#8217;m back in the snowy Northeast after a great four days at SPTechCon San Francisco 2013. As always, the BZ Media folks put on a great show. SPTechCon is consistently well-run and packed with excellent content, vendors, and attendees. I wanted to post links to the slide decks from my three sessions. They are available &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/07/sptechcon-san-francisco-2013-wrap-up/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Well, I&#8217;m back in the snowy Northeast after a great four days at <a title="SPTechCon SFO 2013" href="http://www.sptechcon.com/SanFrancisco2013/" target="_blank">SPTechCon San Francisco 2013</a>. As always, the <a title="BZ Media" href="http://www.bzmedia.com/" target="_blank">BZ Media</a> folks put on a great show. SPTechCon is consistently well-run and packed with excellent content, vendors, and attendees.</p>
<p>I wanted to post links to the slide decks from my three sessions. They are available on SlideShare.</p>
<p style="text-align: center;"><iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/16931122?rel=0" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="text-align: center; margin-bottom: 5px;"><strong> <a title="SPTechCon SFO 2013 - SharePoint Solutions with SPServices" href="http://www.slideshare.net/sympmarc/sptechcon-sfo-2013-sharepoint-solutions-with-spservices" target="_blank">SPTechCon SFO 2013 &#8211; SharePoint Solutions with SPServices</a></strong></div>
<p style="text-align: center;"><iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/16952004?rel=0" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="text-align: center; margin-bottom: 5px;"><strong> <a title="SPTechCon SFO 2013 - Creating a Great User Experience in Sharepoint" href="http://www.slideshare.net/sympmarc/sptechcon-sfo-2013-creating-a-great-user-experience-in-sharepoint" target="_blank">SPTechCon SFO 2013 &#8211; Creating a Great User Experience in Sharepoint</a></strong></div>
<div style="text-align: left; margin-bottom: 5px;">If you weren&#8217;t at SPTechCon or you were there and missed this session, I&#8217;ll be doing it again for the <a title="MetaVis SharePoint MVP Webinars Series" href="http://metavistech.com/webinars" target="_blank">MetaVis SharePoint MVP Webinars Series</a> on Wednesday, March 13, 2013 from 2:00 PM &#8211; 3:00 PM EDT. You can register <a title="Creating a Great User Experience in SharePoint" href="http://metavistech.com/webinar/creating-great-user-experience-sharepoint" target="_blank">here</a>. The webinar will also be recorded for later viewing.</div>
<p style="text-align: center;"><iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/17009481?rel=0" height="356" width="427" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="text-align: center; margin-bottom: 5px;"><strong> <a title="SPTechCon SFO 2013 - Building Custom Navigation with SharePoint Lists, jQuery, and jQueryui" href="http://www.slideshare.net/sympmarc/sp-tech-con-sfo-2013-building-custom-navigation-with-sharepoint-lists-jquery-and-jqueryui" target="_blank">SPTechCon SFO 2013 &#8211; Building Custom Navigation with SharePoint Lists, jQuery, and jQueryUI</a></strong></div>
<p>In addition, as I promised in my third session, here&#8217;s a <a href="http://sympmarc.com/wp-content/uploads/2013/03/NavDemo-2013-03-06.zip">link to a WSP</a> which contains the demos I showed. The WSP is simply the Office365 site saved as a template. In the past, some people have had difficulty instantiating my demo templates in their environments due to activated features not matching. (My rants on the lack of  true portability of SharePoint-based content will probably continue, like <a title="Trials and Tribulations: Migrating My Demos Site to Office365" href="http://sympmarc.com/2012/01/10/trials-and-tribulations-migrating-my-demos-site-to-office365/">Trials and Tribulations: Migrating My Demos Site to Office365</a>, <a title="Office365 SharePoint Online Portability Issues Strike Again" href="http://sympmarc.com/2012/03/08/office365-sharepoint-online-portability-issues-strike-again/">Office365 SharePoint Online Portability Issues Strike Again</a>, and <a title="Moving Lists from Hosted WSS 3.0 to Office365 – The ShareGate Way" href="http://sympmarc.com/2012/06/07/moving-lists-from-hosted-wss-3-0-to-office365-the-sharegate-way/">Moving Lists from Hosted WSS 3.0 to Office365 – The ShareGate Way</a>.) If you run into this sort of issue, let me know in the comments and we&#8217;ll see what we can work out.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=Tcc7Qo-6a08:NzzidC5Vwpo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/Tcc7Qo-6a08" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/07/sptechcon-san-francisco-2013-wrap-up/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/07/sptechcon-san-francisco-2013-wrap-up/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sptechcon-san-francisco-2013-wrap-up</feedburner:origLink></item>
		<item>
		<title>SPServices 2013.01 Is Underway – Learnings Ensue</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/zW3XMbCRrLo/</link>
		<comments>http://sympmarc.com/2013/03/01/spservices-2013-01-is-underway-learnings-ensue/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 17:41:31 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA["use strict";]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[JSHint]]></category>
		<category><![CDATA[JSLint]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16597</guid>
		<description><![CDATA[I&#8217;ve started really cranking on the new version of SPServices and I&#8217;m having a blast, as usual. I&#8217;ve learned a few things already, and I thought I&#8217;d capture them in a post. &#8220;use strict&#8221;; Just gotta do it. I balked at implementing this previously, as it kept hating my code. Well, it hated my code &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/03/01/spservices-2013-01-is-underway-learnings-ensue/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve started really cranking on the new version of <a title="SPServices" href="http://spservices.codeplex.com">SPServices</a> and I&#8217;m having a blast, as usual. I&#8217;ve learned a few things already, and I thought I&#8217;d capture them in a post.</p>
<h2>&#8220;use strict&#8221;;</h2>
<p>Just gotta do it. I balked at implementing this previously, as it kept hating my code. Well, it hated my code for a reason. <code>"use strict";</code> makes you fix some pretty dumb mistakes, and I had quite a few of them. SPServices ran just fine with those mistakes, but by implementing <code>"use strict";</code>, they aren&#8217;t even there anymore.</p>
<p>If you want to understand why <code>"use strict";</code> is a good idea with jQuery, read John Resig&#8217;s post <a title="ECMAScript 5 Strict Mode, JSON, and More" href="http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/" target="_blank">ECMAScript 5 Strict Mode, JSON, and More</a>.</p>
<h2>JSLint vs. JSHint</h2>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/JSHint.jpg"><img class=" wp-image-16598 alignright" alt="JSHint" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/03/JSHint.jpg?resize=350%2C156" data-recalc-dims="1" /></a>As part of my refactoring and housecleaning. I went to run SPServices through <a title="JSLint" href="http://jslint.com/" target="_blank">JSLint</a> as I usually do. It seems that <a title="Douglas Crockford" href="http://crockford.com/" target="_blank">Douglas Crockford</a>, godfather of JavaScript and author of JSLint, has introduced what amounts to either an annoying new feature or a bug into JSLint. I saw the message &#8220;Use spaces, not tabs.&#8221; on so many lines that JSLint only was making it through about 1% of my code before giving up.</p>
<p>There&#8217;s a post over on <a title="StackOverflow" href="http://stackoverflow.com" target="_blank">StackOverflow</a> called <a title="New JSLint errors “use spaces, not tabs” and “unsafe character”" href="http://stackoverflow.com/questions/13913189/new-jslint-errors-use-spaces-not-tabs-and-unsafe-character" target="_blank">New JSLint errors “use spaces, not tabs” and “unsafe character”</a> wherein someone has tracked down what&#8217;s going on. I like using tabs in my code, so I took the hint and the advice in the post and headed over to <a title="JSHint" href="http://jshint.com/" target="_blank">JSHint</a> instead.</p>
<p>It turns out that JSHint does some nice things that JSLint doesn&#8217;t do, anyway. Each message shows the line number as a link which takes you into the code at the proper spot to fix it right there. With JSLint, I was always copy/pasting back and forth to SharePoint Designer to make my fixes. JSHint also color codes your code in the edit window so that you can really do editing. Very nice. The only drawback is that JSHint throws an error when I try to run it in IE9, but I&#8217;m fine with working in Firefox.</p>
<h2>Refactoring</h2>
<p>Every single time I go through SPServices, I do a lot of refactoring. I&#8217;m a learning human, and each time I know more (at least I like to think I do) about good coding practices than the last time. Sometimes I really want to slap myself up side the head seeing what I did in some of my earliest efforts. I&#8217;m taking this opportunity to refactor things yet again, creating many more complex objects to store things than I had originally. This is a good thing, not a complicating thing, as it will make the code far more manageable and readable over the long haul. (Yes, there is a long haul. SPServices still has a good number of years in it, IMO.)</p>
<p>I&#8217;m also taking advantage of some of the SharePoint 2010 context information which is available in JavaScript variables (if we&#8217;re in 2010, of course, with nice fall back for 2007). Thanks to John Liu&#8217;s post <a href="/blog/2012/2/3/sharepoint-javascript-current-page-context-info.html">SharePoint &#8211; JavaScript current page context info</a> which gave me the impetus for this.</p>
<h2>Version Numbers</h2>
<p>You may have noticed that I&#8217;ve switched my version numbering scheme. I have been confusing myself with the version numbers over the last year or so. On one level I wanted to sort of align with the jQuery version numbers, and on another I was being coy and avoiding ever getting to version 1.0. (I&#8217;m asymptotic in my tendencies.)</p>
<p>With this version, I&#8217;ve switching the versing scheme altogether. This next version will be <a title="SPServices 2013.01" href="http://spservices.codeplex.com/releases/view/92552" target="_blank">2013.01</a>, meaning the first version in 2013. It moves things away from the jQuery alignment and still is an increasing function, so it should make everyone happy. Except the people who will complain about it.</p>
<p>OK, enough chit chat. Back to work. Mark Miller and I are working on some magic and hijinks for his keynote next week at <a title="SPTechCon" href="http://sptechcon.com" target="_blank">SPTechCon</a> in San Francisco. Hope to see you there!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=zW3XMbCRrLo:1zs0ELpWZ1w:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/zW3XMbCRrLo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/03/01/spservices-2013-01-is-underway-learnings-ensue/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/03/01/spservices-2013-01-is-underway-learnings-ensue/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-2013-01-is-underway-learnings-ensue</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #10 – jqGrid Implementation Using SPServices in SharePoint</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/22RssZi9A98/</link>
		<comments>http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 20:30:29 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jqGrid]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16552</guid>
		<description><![CDATA[This entry is part 10 of 13 in the series SPServices StoriesIntroduction Today&#8217;s SPServices Story comes from Prateek Kulkarni in Bengaluru, India. Prateek posted this originally on the C# Corner site as jqGrid Implementation Using SpServices in SharePoint. As with several of the earlier SPServices Stories posts, I found this one interesting because it shows &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 10 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Today&#8217;s <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> Story comes from Prateek Kulkarni in Bengaluru, India. Prateek posted this originally on the C# Corner site as <a title="jqGrid Implementation Using SpServices in SharePoint" href="http://www.c-sharpcorner.com/UploadFile/8c656c/jqgrid-implementation-using-spservices-in-sharepoint/" target="_blank">jqGrid Implementation Using SpServices in SharePoint</a>.</p>
<p>As with several of the earlier SPServices Stories posts, I found this one interesting because it shows how to use SPServices with another framework to render the results obtained from the Web Services calls.</p>
<p>I&#8217;ve had several people tell me that there isn&#8217;t enough &#8220;story&#8221; to these SPServices Stories. Have a better one? Let me know!</p>
<h2>jqGrid with SPServices</h2>
<p>This article is regarding implementation of jqGrid(demo) using SPService(CodePlex)</p>
<p>SPService is a jQuery library which abstracts SharePoint&#8217;s Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server installation.</p>
<p>Use of SPService and jQuery is best explained at Marc’s <a href="http://sympmarc.com/2011/07/08/adding-jqueryspservices-to-a-sharepoint-page-step-one-always/">blog</a>.</p>
<p>Following Js files are needed for JqGrid Implementation with SPService</p>
<ul>
<li>jquery-1.8.2.js</li>
<li>grid.locale-en.js</li>
<li>jquery.jqGrid.min.js  // Structuring jqGrid</li>
<li>json2-min.js  // Parsing data to json format</li>
<li>jquery.SPServices-0.7.2.js  // For getting the list items</li>
</ul>
<p>Css file required</p>
<ul>
<li>ui.jqgrid.css  //Style sheet of Grid</li>
</ul>
<p>HTML controls for jqGrid are as mentioned below.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id='tblMain' style=&quot;float:left&quot;&gt;
  &lt;table  id=&quot;list&quot; &gt;&lt;/table&gt;
  &lt;div id=&quot;pager&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Loading JqGrid on the page load:</p>
<pre class="brush: jscript; title: ; notranslate">
jQuery(&quot;#list&quot;).jqGrid({
  datatype: GetMyData,
  colNames:[&quot;Project ID&quot;,&quot;Project Name&quot;,&quot;Delivery Manager&quot;,&quot;ApprovalStatus&quot;],
  colModel:[{name:'ProjectId',index:'ProjectId',align:'left',sortable: true},
            {name:'ProjectName',index:'ProjectName',align:'left',sortable: true },
          {name:'DeliveryManager',index:'DeliveryManager',align:'left',sortable:true},
          {name:'ApprovalStatus',index:'ApprovalStatus',align: 'left',sortable: true }
                       ],
  pager: true,
  pager: '#pager',
  pageinput: true,
  rowNum: 5,
  rowList: [5, 10, 20, 50, 100],
  sortname: 'ApprovalStatus',
  sortorder: &quot;asc&quot;,
  viewrecords: true,
  autowidth: true,
  emptyrecords: &quot;No records to view&quot;,
  loadtext: &quot;Loading...&quot;
});
</pre>
<p>In the above jqGrid load function I have mentioned the datatype for the grid as GetMyData() which is a function that gets triggerred first.</p>
<p>The GetMyData method has function GetDataOnLoad which uses the SpServices which has the basic operation of getting the list items i.e. GetListItems, which need optional CAML Query property which will fetch the data from list with some WHERE clause.</p>
<p>In the code I have a list called ProjectDetailsList which will contain details of some projects which are inserted by some Project Manager or delivery manager. So the requirement was when a user log in to the system I should get the current login user name and pass the same user name to the “where” clause of query so the grid will contain data of projects to which the current logged in user is assigned as PM or DM.</p>
<p>To get the current login user am using SpServices Operation SpGetCurrentUser.</p>
<p>The method GetTheOrderByType function will make the query part for SpServices.</p>
<p>The functions code is as follows:</p>
<pre class="brush: jscript; title: ; notranslate">
function ForGettingUserName() {
  var userName = $().SPServices.SPGetCurrentUser({
      fieldName : &quot;Title&quot;,
      debug : false
    });
  return userName;
}

function GetMyData() {
  sortIdexName = jQuery(&quot;#list&quot;).getGridParam(&quot;sortname&quot;); //Maintaining Consitant SortName after the Sortcol event
  sortOrderName = jQuery(&quot;#list&quot;).getGridParam(&quot;sortorder&quot;); //Maintaining Consistant Sort Order
  Query = GetTheOrderByType(sortIdexName, sortOrderName);
  var CAMLViewFields = &quot;&lt;ViewFields&gt;&quot; +
     + &quot;&lt;FieldRef Name='projectName' /&gt;&lt;FieldRef Name='projectID' /&gt;&quot;
     + &quot;&lt;FieldRef Name='Title' /&gt;&lt;FieldRef Name='deliveryManager' /&gt;&quot;
     + &quot;&lt;FieldRef Name='projectSQA' /&gt;&lt;FieldRef Name='approvalStatus' /&gt;&quot;
     + &quot;&lt;FieldRef Name='projectStartDate' /&gt;&lt;FieldRef Name='projectEndDate' /&gt;&quot;
     + &quot;&lt;FieldRef Name='sqasiteurl' /&gt;&lt;FieldRef Name='ID' /&gt;&quot;
     + &quot;&lt;/ViewFields&gt;&quot;;
  GetDataOnLoad(Query, CAMLViewFields);
}
Function for Getting the Query Type and the particular WHERE CLAUSE TO send the Query to GetListItem function
function GetTheOrderByType(index, sortOrder, userName) {
  var OrderByType;
  if (index == &quot;ProjectName&quot;) {
    if (sortOrder == &quot;desc&quot;) {
      OrderByType = &quot;&lt;Query&gt;&quot; +
         + &quot;&lt;Where&gt;&lt;Or&gt;&quot; + &quot;&lt;Eq&gt;&quot; + &quot;&lt;FieldRef Name='deliveryManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&quot; + &quot;&lt;/Eq&gt;&quot;
         + &quot;&lt;Eq&gt;&lt;FieldRef Name='projectManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&lt;/Eq&gt;&quot; + &quot;&lt;/Or&gt;&lt;/Where&gt;&quot; +
         + &quot;&lt;OrderBy&gt;&lt;FieldRef  Name='projectName' Ascending='FALSE' /&gt;&lt;/OrderBy&gt;&quot; +
         + &quot;&lt;/Query&gt;&quot;;
    } else {
      OrderByType = &quot;&lt;Query&gt;&quot; +
         + &quot;&lt;Where&gt;&lt;Or&gt;&quot; + &quot;&lt;Eq&gt;&quot; + &quot;&lt;FieldRef Name='deliveryManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&quot; + &quot;&lt;/Eq&gt;&quot;
         + &quot;&lt;Eq&gt;&lt;FieldRef Name='projectManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&lt;/Eq&gt;&quot; + &quot;&lt;/Or&gt;&lt;/Where&gt;&quot; +
         + &quot;&lt;OrderBy&gt;&lt;FieldRef  Name='projectName' Ascending='FALSE' /&gt;&lt;/OrderBy&gt;&quot; +
         + &quot;&lt;/Query&gt;&quot;;
    }
  } else if (index == &quot;ApprovalStatus&quot;) {
    if (sortOrder == &quot;desc&quot;) {
      OrderByType = &quot;&lt;Query&gt;&quot; +
         + &quot;&lt;Where&gt;&lt;Or&gt;&quot; + &quot;&lt;Eq&gt;&quot; + &quot;&lt;FieldRef Name='deliveryManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&quot; + &quot;&lt;/Eq&gt;&quot;
         + &quot;&lt;Eq&gt;&lt;FieldRef Name='projectManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&lt;/Eq&gt;&quot; + &quot;&lt;/Or&gt;&lt;/Where&gt;&quot; +
         + &quot;&lt;OrderBy&gt;&lt;FieldRef  Name='approvalStatus' Ascending='FALSE' /&gt;&lt;/OrderBy&gt;&quot; +
         + &quot;&lt;/Query&gt;&quot;;
    } else {
      OrderByType = &quot;&lt;Query&gt;&quot; +
         + &quot;&lt;Where&gt;&lt;Or&gt;&quot; + &quot;&lt;Eq&gt;&quot; + &quot;&lt;FieldRef Name='deliveryManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&quot; + &quot;&lt;/Eq&gt;&quot;
         + &quot;&lt;Eq&gt;&lt;FieldRef Name='projectManager'/&gt;&lt;Value Type='Text'&gt;&quot;
         + userName + &quot;&lt;/Value&gt;&lt;/Eq&gt;&quot; + &quot;&lt;/Or&gt;&lt;/Where&gt;&quot; +
         + &quot;&lt;OrderBy&gt;&lt;FieldRef  Name='approvalStatus' Ascending='FALSE' /&gt;&lt;/OrderBy&gt;&quot; +
         + &quot;&lt;/Query&gt;&quot;;
    }
    return OrderByType;
  }

  //This function gets the data from List using SpServices
  Function GetDataOnLoad(Query, CAMLViewFields) {
    $().SPServices({
      operation : &quot;GetListItems&quot;,
      async : false,
      listName : &quot;ProjectDetailsList&quot;,
      CAMLQuery : Query,
      CAMLViewFields : CAMLViewFields,
      completefunc : processResult
    });
  }
</pre>
<p>The processResult is the function which formats the data which can be converted to Json and adds to the JqGrid.<br />
The reason of formatting of data in the following particular format is to make it readable by the Json parser which is json2.js file. I had implemented the same JqGrid in asp.net application with AJAX calls where it was returning the data in this format and some other bloggers also used the same data format in the MVC or asp.net application with the help for JsonHelper class which mainly formats the data returned from the DB</p>
<pre class="brush: jscript; title: ; notranslate">
//Processing the XML result to formatted Json so that We can bind data to grid in Json format
function processResult(xData, status) {
  var counter = 0; // Gets the total number of records retrieved from the list (We can also use xData.ItemCount method for counting the number of rows in the data )
  var newJqData = &quot;&quot;;

  $(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function () {

    var JqData;
    if (counter == 0) {
      JqData = &quot;{id:'&quot; + $(this).attr(&quot;ows_projectID&quot;) + &quot;',&quot;
         + &quot;cell:[&quot; + &quot;'&quot; + $(this).attr(&quot;ows_projectID&quot;) + &quot;','&quot; +
        $(this).attr(&quot;ows_projectName&quot;) + &quot;','&quot; +
        $(this).attr(&quot;ows_deliveryManager&quot;) + &quot;',',&quot; +
        &quot;]}&quot;;
      newJqData = newJqData + JqData;
      counter = counter + 1;
    } else {
      var JqData = &quot;{id:'&quot; + $(this).attr(&quot;ows_projectID&quot;) + &quot;',&quot;
         + &quot;cell:[&quot; + &quot;'&quot; + $(this).attr(&quot;ows_projectID&quot;) + &quot;','&quot; +
        $(this).attr(&quot;ows_projectName&quot;) + &quot;','&quot; +
        $(this).attr(&quot;ows_deliveryManager&quot;) + &quot;',',&quot; +
        &quot;]}&quot;;
      newJqData = newJqData + JqData;
      counter = counter + 1;
    }

  });
  FinalDataForGrid(newJqData, counter);
}
</pre>
<p>That’s it. Add the data to the grid with the div control and the other page number calculation is for showing the pager.</p>
<pre class="brush: jscript; title: ; notranslate">
function FinalDataForGrid(jqData, resultCount) {
  dataFromList = jqData.substring(0, jqData.length - 1);
  var currentValue = jQuery(&quot;#list&quot;).getGridParam('rowNum');
  var totalPages = Math.ceil(resultCount / currentValue);
  var PageNumber = jQuery(&quot;#list&quot;).getGridParam(&quot;page&quot;); // Current page number selected in the selection box of the JqGrid
  //formatting rows
  newStr = &quot;{total:&quot; + '&quot;' + totalPages + '&quot;' + &quot;,&quot; + &quot;page:&quot; + '&quot;' + PageNumber + '&quot;' + &quot;,&quot;
     + &quot;records:&quot; + '&quot;'
     + resultCount + '&quot;' + &quot;,&quot;
     + &quot;rows:&quot;
     + &quot;[&quot; + dataFromList + &quot;]}&quot;;
  var thegrid = jQuery(&quot;#list&quot;)[0];
  thegrid.addJSONData(JSON.parse(newStr)); //Binding data to the grid which is of JSON Format
}
</pre>
<p>And the grid works fine and fast on paging, sorting and also even search, we can make the particular column as hyperlink which I will blog in the next part. Sample grid is as follows and this grid has some extra columns then the mentioned in above code</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=22RssZi9A98:KkB1VRHvQG4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/22RssZi9A98" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/26/spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-10-jqgrid-implementation-using-spservices-in-sharepoint</feedburner:origLink></item>
		<item>
		<title>SPServices Futures: Moving to jQuery’s Deferred Objects and More</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/gLiRrXbfZe0/</link>
		<comments>http://sympmarc.com/2013/02/22/spservices-futures-moving-to-jquerys-deferred-objects/#comments</comments>
		<pubDate>Fri, 22 Feb 2013 21:31:13 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[deferred object]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint 2013]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16573</guid>
		<description><![CDATA[As I gear up to work on the next release of SPServices, I want to make some pretty fundamental changes/improvements to the internal plumbing. What I&#8217;m hoping to do with this post is to gather any ideas and feedback that the user community has about the implementation before I go too far with things. Deferred &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/22/spservices-futures-moving-to-jquerys-deferred-objects/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: left;">As I gear up to work on the next release of <a title="SPServices" href="http://spservices.codeplex.com/" target="_blank">SPServices</a>, I want to make some pretty fundamental changes/improvements to the internal plumbing. What I&#8217;m hoping to do with this post is to gather any ideas and feedback that the user community has about the implementation before I go too far with things.</p>
<p style="text-align: center;"><a href="http://spservices.codeplex.com"><img class="aligncenter size-full wp-image-15853" alt="SPServices" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/09/logo33.jpg?resize=312%2C85" data-recalc-dims="1" /></a></p>
<h2>Deferred Object and Promises</h2>
<p>In all prior versions, we&#8217;ve relied on the completefunc (which I made up) to process the results we get back from a Web Services operation call. In the meantime, jQuery has moved forward significantly.</p>
<p>In jQuery 1.5, we got the first deferred object capabilities. I was loathe to change the internal workings of SPServices at the time because we had a substantial user base, even then.</p>
<p>Now the user base is significantly larger (as of this writing, there have been almost 75,000 [!] total downloads), but I think it&#8217;s time to add the deferred capabilities into the core SPServices function. More and more people have been exposed to deferred processing capabilities in script at this point, so it will be less of a shock to existing SPServices users (I hope!).</p>
<p>Oddly, I&#8217;ve only had one request (at least that I can remember) to add deferred processing into SPServices. It came from a Codeplex user named <a title="MgSam" href="http://www.codeplex.com/site/users/view/MgSam" target="_blank">MgSam</a> in a thread s/he titled <a title="JQuery Deferred compatibility" href="http://spservices.codeplex.com/discussions/393614" target="_blank">JQuery Deferred compatibility</a>, and I&#8217;ll admit that I blew it off a bit when he raised it as a possibility.</p>
<p>My strongest impetus for considering this fundamental architecture shift is having seen Scott Hillier talk several times about <a title="Utilizing Promises in SharePoint 2013 Apps" href="http://www.shillier.com/archive/2012/11/29/utilizing-promises-in-sharepoint-2013-apps.aspx" target="_blank">Utilizing Promises in SharePoint 2013 Apps</a>. In actual fact, his talk applies to JavaScript (and thus jQuery) development more than it applies to SharePoint 2013 development. We can use the deferred methodology even if we&#8217;re running our scripts on SharePoint 2007. It&#8217;s a way to manage requests in the script and has little to do with the version of SharePoint.</p>
<p>In doing this, my goal will be to keep full backward compatibility so that all existing code continues to function with no changes, but I may deprecate the current completefunc focused methodology, either in this next release or shortly thereafter.</p>
<p>in the simplest form, it will look something like this (borrowing from MgSam&#8217;s example in the thread above):</p>
<pre class="brush: jscript; title: ; notranslate">
function myCode(someOtherListId) {
    /* Ideally, I should be able to do this call SPListNameFromUrl asynchronously
     * as well, perhaps add an optional &quot;async&quot; parameter
     * which, if used, returns the jqXHR object and invokes
     * a callback upon completion rather than blocking until
     * the data returns. This is not the main point of this code though.
     */
    var currentListId = $().SPServices.SPListNameFromUrl();

    //Call 1
    var a = $().SPServices({
        operation: &quot;GetListItems&quot;,
        async: true,
        listName: currentListId,
        completefunc: function(xData) {
            //Do something useful
        }
    });

    //Call 2
    var b = $().SPServices({
        operation: &quot;GetList&quot;,
        async: true,
        listName: currentListId,
        completefunc: function(xData) {
            //Do something useful
        }
     });

     //Call 3
     var c = $().SPServices({
        operation: &quot;GetListItems&quot;,
        async: true,
        listName: someOtherListId,
        completefunc: function(xData) {
            //Do something useful
        }
     });

     /* Now I want to do something once all 3
      * asynchronous calls have completed. Under the current
      * model, there's no easy way to do this.
      * I either have to hand-roll some ugly code,
      * or contort my completefuncs so that they work with
      * jQuery's Deferred.
     */
}
</pre>
<p>Moving toward the deferred object approach will also mean that I&#8217;ll replace the simplistic <a title="Caching" href="http://spservices.codeplex.com/wikipage?title=Caching" target="_blank">caching</a> mechanism I put into place using the .data() function in <a title="SPServices v0.7.2" href="http://spservices.codeplex.com/releases/view/81401" target="_blank">v0.7.2</a>. There will be no visible difference in the way it works, but the underlying mechanism will be deferred promises instead.</p>
<h2>SharePoint 2007</h2>
<p>I&#8217;m also considering finally ending development specifically for SharePoint 2007. I&#8217;ve continued to use WSS 3.0 as my development environment since the first release of SPServices so that I can &#8220;test up&#8221; rather than down *and* up.</p>
<p>I still have a lot of people contacting me with questions who are using SharePoint 2007. In fact, some of my best clients are still on SharePoint 2007. It&#8217;s still a great platform that works well for many people who are still using it.</p>
<p>That said, there are some capabilities in SharePoint 2010 and now SharePoint 2013 that I haven&#8217;t tried to take advantage of because they aren&#8217;t there in SharePoint 2007. It isn&#8217;t that I want to abandon the SharePoint 2007 folks, but I&#8217;m considering making the main focus SharePoint 2010.</p>
<p>I&#8217;m very interested in hearing people&#8217;s thoughts on that. There&#8217;s no easy way for me to know what versions everyone out there has, so chime in.</p>
<h2>Version Numbering</h2>
<p>These changes will definitely merit a more significant version bump than just going from 0.7.2 to 0.7.3, of course. Is it finally time to ship a 1.0.0? Or maybe I should just decide to go to 5.3.8 or something. The numbers mean nothing, of course, as long as they go in a consistent direction. I&#8217;m even toying with 2013.01. Any thoughts on this?</p>
<p>Thanks to everyone out there who uses SPServices, especially those of you who have contacted me to let me know how it has helped you accomplish your business goals. If you have a story to tell, please consider writing it up for my <a title="SPServices Stories" href="http://sympmarc.com/series/spservices-stories/">SPServices Stories</a> series. I&#8217;m planning to keep that series going as long as there are good stories to tell.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=gLiRrXbfZe0:_RTFUipPTrg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/gLiRrXbfZe0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/22/spservices-futures-moving-to-jquerys-deferred-objects/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/22/spservices-futures-moving-to-jquerys-deferred-objects/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-futures-moving-to-jquerys-deferred-objects</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #9: Developing with Client-side Technologies: jQuery, REST, SPServices and jsRender</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/w0Nj7U4WVnA/</link>
		<comments>http://sympmarc.com/2013/02/20/spservices-stories-9-developing-with-client-side-technologies-jquery-rest-spservices-and-jsrender/#comments</comments>
		<pubDate>Wed, 20 Feb 2013 06:11:52 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16490</guid>
		<description><![CDATA[This entry is part 9 of 13 in the series SPServices StoriesIntroduction Here&#8217;s another SPServices Stories post that is a bit older and talks about how you can use SPServices with other popular plugins and frameworks. While this is possible with the CSOM, I&#8217;ve always found that SPServices provides a much tighter and more controllable syntax. You &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/20/spservices-stories-9-developing-with-client-side-technologies-jquery-rest-spservices-and-jsrender/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 9 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Here&#8217;s another SPServices Stories post that is a bit older and talks about how you can use <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> with other popular plugins and frameworks. While this is possible with the CSOM, I&#8217;ve always found that SPServices provides a much tighter and more controllable syntax. You probably can&#8217;t trust me on that, though, since I wrote it.</p>
<p>Phil Harding&#8217;s post from March 2012 called <a title="SharePoint: Developing with Client-side Technologies: jQuery, REST, SPServices and jsRender" href="http://platinumdogs.me/2012/03/20/sharepoint-displaying-list-data-with-client-side-technology-spservices-jquery-jsrender/" target="_blank">SharePoint: Developing with Client-side Technologies: jQuery, REST, SPServices and JsRender</a> caught my eye because in it he explains how he used the popular <a title="JsRender" href="https://github.com/BorisMoore/JsRender" target="_blank">JsRender</a> with SPServices. Many people want to use rendering frameworks in general or specifically in conjunction with SPServices, and JsRender has been a popular choice. <a title="Knockout.js" href="http://knockoutjs.com/" target="_blank">Knockout,js</a> is probably becoming more popular, but JsRender still has its place. You should evaluate the options based on your own business requirements to decide what&#8217;s best for you.</p>
<p>Keep in mind that is doesn&#8217;t really matter what version of SharePoint you&#8217;re working with, as these techniques can work well with SharePoint 2007, 2010, and 2013.</p>
<p>Phil Harding (<a title="@phillipharding" href="http://twitter.com/phillipharding" target="_blank">@phillipharding</a>) is an independent SharePoint consultant from Manchester, UK, specializing in development for the 2007, 2010 and (he&#8217;s hoping really really soon) 2013.</p>
<h2>Developing with Client-side Technologies: jQuery, REST, SPServices and JsRender</h2>
<p>Having recently been immersed in developing client-side functionality for a SharePoint 2007 project I thought I’d share some of the techniques and tools I’ve used in doing so.</p>
<p>The functional requirements in this project are pretty standard CRUD operations;</p>
<ol>
<li>Collect data from the user and create new list items</li>
<li>Display and modify existing data</li>
<li>Display formatted lists of existing data</li>
</ol>
<p>In this post we are going to retrieve a set of list items from a SharePoint list and display that data using a technique very similar to that used by ASP.NET data bound/templatized controls.</p>
<h3>SPServices.</h3>
<p>The premier tool IMHO for interacting with SharePoint 2007 from the client is the <a title="SPservices" href="http://spservices.codeplex.com/" target="_blank">SPServices</a> library by <a title="@sympmarc" href="http://twitter.com/#!/sympmarc" target="_blank">@sympmarc</a>, check out the documentation as the library is pretty extensive.</p>
<p>Here we will be using the SPServices <a title="GetListItems" href="http://spservices.codeplex.com/wikipage?title=GetListItems" target="_blank">GetListItems</a> method which wraps the SharePoint <a title="Lists Web Service" href="http://msdn.microsoft.com/en-us/library/lists.lists_members(v=office.12).aspx" target="_blank">Lists</a> web service.</p>
<h3>REST.</h3>
<p>If you’re working with SharePoint 2010, you might also consider using the <a title="REST Interface" href="http://msdn.microsoft.com/en-us/library/ff521587(v=office.14).aspx" target="_blank">REST interface</a> for retrieving data, although this interface by default returns XML, it can also be configured to return JSON, and the <a href="http://api.jquery.com/jQuery.getJSON/" target="_blank">jQuery getJSON()</a> method does exactly that by configuring the <a href="http://api.jquery.com/jQuery.ajax/" target="_blank">$.ajax()</a> call to the REST interface appropriately. Why JSON? Well as with SPServices, using JSON encoded results fits very nicely when using <a href="https://github.com/BorisMoore/jsrender" target="_blank">jsRender</a> to render your output markup. Some good examples of how to use the REST interface can be <a href="http://msdn.microsoft.com/en-us/data/ff478141.aspx" target="_blank">found here</a>.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>Ed: Note that as of v0.7.1, SPServices contains a function called <strong><a title="SPXmlToJson" href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPXmlToJson">$().SPXmlToJson</a></strong> which makes it a no-brainer to convert GetListItems results to JSON.</div>
<h3>Choosing a Client Side Data Retrieval Interface</h3>
<p>If you’re using SharePoint 2007, your options are (very) limited. By limited I mean, that pretty much your only sane option is <strong>SPServices</strong>, there are other options of course, 2007 has the [SOAP] List webservice which you could grok against – you’ll have to write a lot of javascript if you want to go that route, but seriously, why bother, SPServices has you more than covered.</p>
<p>If you’re using SharePoint 2010 or 2013, you’ve got the JSOM interface which you can use to read list data, frankly though, given the amount of code you have to write just to read some data, I almost never use the JSOM for this.</p>
<p>SPServices of course is a valid choice to make – as with all things choose the right tool to accomplish your goal. Personally, I tend to use REST when my data needs are typically one-way, <em>i.e.</em> reading, even then I may defer to SPServices if my query is sufficiently complex – the REST interface is pretty damn flexible but it won’t allow you to model complex queries in the way that CAML does.</p>
<p>For updating data back to lists, again you can use REST, JSOM or SPServices. For me, I might typically use JSOM to update list items, sure I can do this using REST, but to do this you’ll have to manage the <strong>ETag</strong> – another piece of state to maintain (see the <a title="Concurrency Management" href="http://msdn.microsoft.com/en-us/library/ff798339.aspx" target="_blank">Concurrency Management section</a> for more information). I also came across a javascript library recently called <a href="http://datajs.codeplex.com/" target="_blank">data.js</a>, which seems to be a wrapper over OData services, I haven’t used it yet but it definitely looks interesting.</p>
<p>Finally, SPServices has the <a href="http://spservices.codeplex.com/wikipage?title=UpdateListItems" target="_blank">UpdateListItems</a> method which serves both creating and updating data.</p>
<h3>jsRender.</h3>
<p>Having retrieved your data from SharePoint, you could of course, write quite a bunch of grungy JavaScript and DOM code to create the rendered display, however there is a much better way, and that is to use something latterly called <a href="http://api.jquery.com/jquery.tmpl/" target="_blank">jQuery Templates</a>, which, like ASP.NET data-bound or templatized controls, allows you to write the markup template for your output and include bits which bind to the data being displayed.</p>
<p>jQuery Templates are officially deprecated in favour of a new but similar technology called <a href="https://github.com/BorisMoore/jsrender" target="_blank">jsRender</a> by <a href="http://www.borismoore.com/" target="_blank">Boris Moore</a>.</p>
<p>jsRender seems to be gaining a lot of traction and there is a growing amount of information available out there, and the <a href="https://github.com/BorisMoore/jsrender/tree/master/demos/step-by-step" target="_blank">documentation provided by Boris</a> is more than enough to get you going.</p>
<h3>Retrieving List Items.</h3>
<p>So lets get going, first we’ll write the SPServices code to retrieve a set of list items, which we’ll then iterate over and place into an array of JSON objects (required by jsRender).</p>
<pre class="brush: jscript; title: ; notranslate">
function GetListItemData() {
  var container=$('#container');
  $(container).html(&quot;&quot;);

  // get list data
  var datarows = [];
  $().SPServices({
    operation: &quot;GetListItems&quot;,
    webURL:&quot;http://sp2007/sites/demo&quot;,
    async: false,
    listName: &quot;The List Title&quot;,
    CAMLViewFields:&quot;&quot;,
    CAMLQuery:&quot;........&quot;,
    completefunc: function(xData, Status) {
      $(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function() {
        var x={
          title: $(this).attr('ows_Title'),
          id: $(this).attr('ows_ID'),
          reviewoutcome: $(this).attr('ows_ReviewOutcome')
        };
        datarows.push(x);
      });
    }
  });
  ..... // display list data
}
</pre>
<p>Here we use SPServices GetListItems to retrieve the data, amongst other things we supply the following parameters;</p>
<ol>
<li>operation: “GetListItems”</li>
<li>Optional webURL parameter, if not supplied SPServices will use the equivalent of SPContext.Current [the current Web]</li>
<li>listName: “The List Title”</li>
<li>CAMLViewFields: the list of fields we want returned by the query</li>
<li>CAMLQuery: the CAML query in the form; “&lt;Query&gt;&lt;Where&gt;….&lt;/Where&gt;&lt;OrderBy&gt;….&lt;/OrderBy&gt;&lt;/Query&gt;”</li>
</ol>
<p>I also specify a completion function which parses and iterates over the returned rows, creates a JSON object and adds it to an array.</p>
<p>Note: SPServices also provides the <a href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPXmlToJson" target="_blank">SPXmlToJson</a> function which will convert the returned rows to an array of JSON objects.</p>
<p>Next we’ll use jsRender to display the data we just retrieved using the supplied template (#reviewTemplate), in this case the template with id <strong>reviewTemplate</strong>.</p>
<pre class="brush: jscript; title: ; notranslate">
function GetListItemData() {
  var container=$('#container');
  $(container).html(&quot;&quot;);

  var datarows = [];

  ..... // get list data

  // display list data
  if (datarows.length &gt; 0) {
    $(container).html( $(&quot;#reviewTemplate&quot;).render(datarows) );
  } else {
    $(container).html(&quot;There are no items to display.&quot;);
  }
}</pre>
<p>The return value from jsRender is then set as the html value of a container DIV or other element.</p>
<h3>jsRender Templates.</h3>
<p>So what’s a jsRender template? Quite simply it is a &lt;SCRIPT /&gt; block with an ID value and a <strong>type</strong> set to <strong>text/x-jsrender</strong>, as shown below.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;script id=&quot;reviewTemplate&quot; type=&quot;text/x-jsrender&quot;&gt;
&lt;TABLE cellSpacing=&quot;0&quot; cellPadding=&quot;0&quot; width=&quot;100%&quot;&gt;
  &lt;TBODY&gt;
    &lt;TR&gt;
      &lt;TD style=&quot;width:400px&quot;&gt;
        &lt;A title=&quot;{{:title}}&quot; href=&quot;{{:~reviewurl(id)}}&quot;&gt;{{:title}}&lt;/A&gt;
      &lt;/TD&gt;
      &lt;TD style=&quot;width:20px&quot;&gt;
        {{outcome reviewoutcome /}}
        {{if reviewoutcome=='Undecided' tmpl='#reviewundecided' /}}
        {{if reviewoutcome=='Accepted' tmpl='#reviewaccepted' /}}
        {{if reviewoutcome=='Rejected' tmpl='#reviewrejected' /}}
      &lt;/TD&gt;
    &lt;/TR&gt;
  &lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/script&gt;
&lt;script id=&quot;reviewundecided&quot; type=&quot;text/x-jsrender&quot;&gt;
  &lt;IMG style=&quot;&quot; title=&quot;this is undecided.&quot; border=&quot;0&quot; src=&quot;http://sp2007/_layouts/images/erg-0.gif&quot; /&gt;
&lt;/script&gt;
&lt;script id=&quot;reviewaccepted&quot; type=&quot;text/x-jsrender&quot;&gt;
  &lt;IMG style=&quot;&quot; title=&quot;this was accepted.&quot; border=&quot;0&quot; src=&quot;http://sp2007/_layouts/images/erg-2.gif&quot; /&gt;
&lt;/script&gt;
&lt;script id=&quot;reviewrejected&quot; type=&quot;text/x-jsrender&quot;&gt;
  &lt;IMG style=&quot;&quot; title=&quot;this was rejected.&quot; border=&quot;0&quot; src=&quot;http://sp2007/_layouts/images/erg-1.gif&quot; /&gt;
&lt;/script&gt;
</pre>
<p>Here we’re showing 4 jsRender templates, reason being that a feature of jsRender allows you to use template composition, <em>i.e.</em> to use different templates to render different parts of the output. In this case we have 3 different templates to render an &lt;IMG…/&gt; element according to the value of the “<strong>reviewoutcome</strong>” object property (which is the listitems ows_ReviewOutcome column value). To summarise whats going on I’ll briefly describe each of the jsRender features we’re using;</p>
<h4>Expression Evaluation / Output an Object Property Value</h4>
<p>Use the <strong>{{:  expression  }}</strong> tag to evaluate an expression or output the property value of the current item, this form does not perform HTML encoding of the output</p>
<p>Use the <strong>{{&gt; expression  }}</strong> tag to evaluate an expression or output the property value of the current item, this form performs HTML encoding of the output</p>
<h4>Call a Custom Helper Function</h4>
<p>Use the <strong>{{:~ customhelper(expression)  }}</strong> tag to call a custom helper function that you have written, which optionally accepts parameters, and returns the desired output – in the sample above we created a helper function called <strong>reviewurl</strong> to build a composite <strong>HREF</strong> value for an <strong>&lt;A /&gt;</strong> element.</p>
<p>See below for help writing a custom helper function.</p>
<h4>Conditional Processing : If/Else</h4>
<p>Use <strong>{{if  expression }}…{{/if}} {{else  expression }}…{{/else}}</strong> tags to perform conditional processing or branching of the template – in the sample above we used conditional processing to choose a different jsRender template to build &lt;IMG /&gt; elements based on the value of the current items <strong>reviewoutcome</strong> property value.</p>
<h4>Call a Custom jsRender Tag</h4>
<p>In the above example we used conditional processing to chose a jsRender template to display different &lt;IMG /&gt; elements, another method of doing this is to write a custom jsRender tag which will do the same thing. To use a custom jsrender tag you have written, use the following form <strong>{{mytagname expression /}}</strong>. In the sample above we created a custom tag called <strong>outcome</strong> which accepted the <strong>reviewoutcome</strong> property value of the current item and returned an &lt;IMG /&gt; element.</p>
<p>See below for help writing a custom tag function.</p>
<h4>To create a custom helper function;</h4>
<p>A custom helper function, as you might imagine, is simply a JavaScript function which optionally accepts parameters and returns something for display. Usefully the function can reference global variables in the page, as you can see I’m referencing global variables <strong>g_rlid</strong> and <strong>g_thispageurl</strong>.</p>
<pre class="brush: jscript; title: ; notranslate">
/* jsRender helper function */
$.views.helpers( {
  reviewurl:function(fid) {
    var m=&quot;mypage.aspx?&quot;;
    m+=&quot;form=Display&quot;;
    m+=&quot;&amp;list=&quot;+g_rlid;
    m+=&quot;&amp;id=&quot;+fid;
    m+=&quot;&amp;Source=&quot;+g_thispageurl;
    return m;
  }
});
</pre>
<h4>To create a custom jsRender Tag function;</h4>
<p>A custom tag function, is also a JavaScript function which optionally accepts parameters and returns something for display.</p>
<pre class="brush: jscript; title: ; notranslate">
/* jsRender custom tag */
$.views.tags({
outcome: function(value) {
var ret='';
switch(value) {
case 'Undecided':
ret=&quot;&lt;IMG style='' title='' border='0' src='http://sp2007/_layouts/images/erg-0.gif' /&gt;&quot;;
break;
case 'Accepted':
ret=&quot;&lt;IMG style='' title='' border='0' src='http://sp2007/_layouts/images/erg-2.gif' /&gt;&quot;;
break;
case 'Rejected':
ret=&quot;&lt;IMG style='' title='' border='0' src='http://sp2007/_layouts/images/erg-1.gif' /&gt;&quot;;
break;
}
return ret;
}
});
</pre>
<p>Putting all this together we get something that is ripe for a little CSS beautification.</p>
<p><img alt="http://i0.wp.com/platinumdogs.files.wordpress.com/2012/03/sps-01.png?w=440" src="http://i0.wp.com/platinumdogs.files.wordpress.com/2012/03/sps-01.png?w=440" data-recalc-dims="1" /></p>
<p>There’s much more to go at in <a href="https://github.com/BorisMoore/jsrender" target="_blank">jsRender</a>, including some interesting effects involving hoverstate and re-rendering of item display using dynamic templates. Hopefully the documentation (and feature-set) will continue to improve and that this post has provided a leg up should you wish to start using it.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=w0Nj7U4WVnA:5X8auw_ZH1Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/w0Nj7U4WVnA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/20/spservices-stories-9-developing-with-client-side-technologies-jquery-rest-spservices-and-jsrender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/20/spservices-stories-9-developing-with-client-side-technologies-jquery-rest-spservices-and-jsrender/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-9-developing-with-client-side-technologies-jquery-rest-spservices-and-jsrender</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #8 – CEWP, Nintex, jQuery, SPServices and the Client API</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/pEj3ECWl9lc/</link>
		<comments>http://sympmarc.com/2013/02/18/spservices-stories-8-cewp-nintex-jquery-spservices-and-the-client-api/#comments</comments>
		<pubDate>Mon, 18 Feb 2013 06:01:48 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16461</guid>
		<description><![CDATA[This entry is part 8 of 13 in the series SPServices StoriesIntroduction I&#8217;ve been keeping a list of older posts about using SPServices that I&#8217;ve seen on the InterWebz for that day when I finally got around to doing something like SPServices Stories. This one is from Dan Stoll (@_danstoll) at Nintex, and was originally published &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/18/spservices-stories-8-cewp-nintex-jquery-spservices-and-the-client-api/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 8 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>I&#8217;ve been keeping a list of older posts about using <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> that I&#8217;ve seen on the InterWebz for that day when I finally got around to doing something like SPServices Stories. This one is from Dan Stoll (<a title="@_danstoll" href="http://twitter.com/_danstoll" target="_blank">@_danstoll</a>) at Nintex, and was originally published on Dan&#8217;s blog back in February, 2012 as <a title="CEWP, Nintex, jQuery, SPServices and the Client API." href="http://www.sharepointpub.com/nintex-jquery-spservices-and-the-client-api-make-for-a-good-team/" target="_blank">CEWP, Nintex, jQuery, SPServices and the Client API</a>.</p>
<p>To me, the fact that someone at Nintex would choose to use SPServices to accomplish something with workflows is pretty telling, in a positive way. The folks over at Nintex know what they are doing, and if they choose to use SPServices as spackle to fill in some of the gaps in SharePoint, then it&#8217;s testament to the value of it.</p>
<p>In <a title="SPServices Stories #7" href="http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/">SPServices Stories #7</a>, John Liu showed an example of starting a workflow with SPServices, and here Dan gives us some of the details under the covers.</p>
<h2>CEWP, Nintex, jQuery, SPServices and the Client API</h2>
<p>I had a requirement that required a not so difficult solution but tricky.. The first requirement was that a webpart had to be embedded in to a publishing page layout that was used over multiple sites in the farm. The next requirement was to only show this webpart to a select group of people.. Easy right ? Using audiences should work a treat…. Wrong. . Embedding the CEWP you can still put in the audience but it doesn’t work because it isn’t in a webpart zone… Ok, so let’s put a webpart zone in.. Pop in my custom CEWP webpart.. The audience set.. but still no joy.. Audience is working but because my webpart is in a webpart zone, it doesn’t show up.</p>
<p>So now I’m faced with .. “How do I get a default webpart to appear on 500 + pages that already exist?? ” Back to square one.. There has to be a way of telling a Div to hide if you aren’t part of a group of some kind. So let’s look at this.. Here is an extract of my page layout</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;certifiedPanel&quot; style=&quot;display: none;&quot;&gt;
  &lt;div class=&quot;article-before-wp&quot;&gt;
    &lt;h3 class=&quot;ms-standardheader ms-WPTitle&quot;&gt;
      &lt;span&gt;Details&lt;/span&gt;
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class=&quot;article-meta article-wp&quot;&gt;
  &lt;table style=&quot;width: 100%;&quot;&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;Contact:&lt;/th&gt;
        &lt;td id=&quot;pubContact&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;Last Modified:&lt;/th&gt;
        &lt;td id=&quot;modifiedOn&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr style=&quot;display: none;&quot;&gt;
        &lt;th style=&quot;width: 36%;&quot;&gt;Last Review Date:&lt;/th&gt;
        &lt;td id=&quot;lastReviewedOn&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;Next Review
        Date:&lt;/th&gt;
        &lt;td id=&quot;reviewedOn&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;Certified Date:&lt;/th&gt;
        &lt;td id=&quot;certifiedOn&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;HYway DOCID:&lt;/th&gt;
        &lt;td id=&quot;docId&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;th class=&quot;style1&quot; style=&quot;width: 36%;&quot;&gt;Reference ID:&lt;/th&gt;
        &lt;td id=&quot;refId&quot;&gt;&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;Managers PanelNoneUse for formatted text, tables, and
  images.true2NormaltruetruetruetruetruetruetrueModeless
  &lt;dir&gt;Default&lt;/dir&gt;Cannot import this Web
  Part.true00000000-0000-0000-0000-000000000000g_73d6de6b_445e_4d9a_8443_c05b20548336/OurProcesses/Documents/startworkflow.txt&lt;/div&gt;
  &lt;div class=&quot;article-after-wp&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
</pre>
<p>You’ll see in the first line, I have included a “display:none” style on the DIV called “certifiedPanel” The rest of it, well the first half of the Certified Panel shows a few fields from the content type, eg Modified Date, ID etc etc.. The second half is the CEWP that has a text file as it’s source of content ‘startworkflow.txt’ .. This is where part 2 of the story begins..</p>
<p>The other requirements is that this “Panel” had to show indicators as to the phases of the document, it also had to have a link to the version history of the document and there also had to be a couple of workflows that could be executed against the page (content type) from this panel.. Firstly, let me show you the panel</p>
<p>The 3 indicators shown here, show the manager at a quick glance that the document isn’t certified (Yellow) because the review date has passed, it isn’t ready for Review either (Red) as the Contact hasn’t been filled in. The only parameter that is ok is that the Review date as been set with “something” (Green)</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/hy_details-300x300.jpg"><img class="aligncenter size-full wp-image-16562" alt="hy_details-300x300" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/hy_details.jpg?resize=300%2C300" data-recalc-dims="1" /></a></p>
<p>As you can see the document has been modified since being certified so this document is now no longer certified as changes may have been made to the content…</p>
<p>Ok so how did we do this.. I’ll post the full contents of the startworkflow.txt file and we can work from there. (the Startworkflow.txt) is used with the Content Editor Webpart to display on the page</p>
<p>[Ed: I've split the HTML and JavaScript sections for better readability.]</p>
<pre class="brush: jscript; title: ; notranslate">
var $ = jQuery;
$(document).ready(SetPageIndicators);
function SetPageIndicators() {

  //get the certified and reviewed indicators
  var certifiedOn = new Date($(&amp;quot;#certifiedOn&amp;quot;).text());
  var hasCertDate = !isNaN(certifiedOn);
  var modifiedOn = new Date($(&amp;quot;#modifiedOn&amp;quot;).text());
  var hasModDate = !isNaN(modifiedOn);
  var reviewOn = new Date($(&amp;quot;#reviewedOn&amp;quot;).text());
  var hasReview = !isNaN(reviewOn);
  var lastReviewedOn = new Date($(&amp;quot;#lastReviewedOn&amp;quot;).text());
  var haslastReviewedOn = !isNaN(lastReviewedOn);
  var baseUrl = &amp;quot;/Style%20Library/hyway/Images/&amp;quot;;

  //set certified icon
  var certImg = $(&amp;quot;#certImg&amp;quot;);
  if (!hasCertDate)
    certImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusRed.png&amp;quot;);
  if (hasCertDate)
    certImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusGreen.png&amp;quot;);
  if ((hasModDate &amp;amp;&amp;amp; hasCertDate) &amp;amp;&amp;amp; (modifiedOn.setDate(+1) &amp;gt; certifiedOn))
    certImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusYellow.png&amp;quot;);

  //set lastReviewedOn icon
  var lastReviewedOnImg = $(&amp;quot;#lastReviewedOnImg&amp;quot;);
  if (!haslastReviewedOn)
    lastReviewedOnImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusRed.png&amp;quot;);
  if (haslastReviewedOn)
    lastReviewedOnImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusGreen.png&amp;quot;);
  if (lastReviewedOn &amp;gt; certifiedOn)
    lastReviewedOnImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusYellow.png&amp;quot;);

  //set review icon
  var reviewImg = $(&amp;quot;#reviewImg&amp;quot;);
  if (!hasReview) {
    reviewImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusRed.png&amp;quot;);
  } else {
    if (reviewOn &amp;gt; new Date()) {
      reviewImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusGreen.png&amp;quot;);
    } else {
      reviewImg.attr(&amp;quot;src&amp;quot;, baseUrl + &amp;quot;statusYellow.png&amp;quot;);
    }
  }

  //Hide the Panel from those who don't need it
  ExecuteOrDelayUntilScriptLoaded(function () {
    var ctx = SP.ClientContext.get_current();
    var web = ctx.get_web();

    // change ID based on
    // http://devserver/OurProcesses/_layouts/people.aspx?MembershipGroupId=551
    // http://server/OurProcesses/_layouts/people.aspx?MembershipGroupId=752
    var group = web.get_siteGroups().getById(551);
    ctx.load(group);
    var users = group.get_users();
    ctx.load(users);
    var user = web.get_currentUser();
    ctx.load(user);
    ctx.executeQueryAsync(Function.createDelegate(this, function () {

        // success
        for (var i = 0; i &amp;lt; users.get_count(); i++) {
          var u = users.get_item(i);
          //alert(u.get_loginName());
          if (u.get_loginName() == user.get_loginName()) {
            //alert(&amp;quot;found you&amp;quot;);

            $(&amp;quot;.certifiedPanel&amp;quot;).show();
          }
        }
      }), Function.createDelegate(this, function () {}));
  }, &amp;quot;sp.js&amp;quot;);
}
function StartWorkflow(ItemURL, WorkflowName) {
  var waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('working on it….', 'Please wait while Gnomes get this sorted for you...', 76, 330);

  // start the workflow manually, then take the TemplateID from the URL of the Workflow starting form
  // this is no good since it changes when you republish workflow...
  // get TemplateID first for item.
  $().SPServices({
    operation : &amp;quot;GetTemplatesForItem&amp;quot;,
    item : ItemURL,
    async : false,
    completefunc : function (data, status) {
      var workflowTemplateID;
      if (status == &amp;quot;success&amp;quot;) {
        $(data.responseXML).find(&amp;quot;WorkflowTemplates &amp;gt; WorkflowTemplate&amp;quot;).each(function (i, e) {

          // hard coded workflow name
          if ($(this).attr(&amp;quot;Name&amp;quot;) == WorkflowName) {
            var guid = $(this).find(&amp;quot;WorkflowTemplateIdSet&amp;quot;).attr(&amp;quot;TemplateId&amp;quot;);
            if (guid != null) {
              workflowTemplateID = &amp;quot;{&amp;quot; + guid + &amp;quot;}&amp;quot;;
            }
          }
        });
      } else {

        // error can't find template
        alert(status + &amp;quot; : &amp;quot; + data.responseText);
        return;
      }

      // start workflow now with obtained templateID. Note this must run within the completeFunc of the first webservice call
      $().SPServices({
        operation : &amp;quot;StartWorkflow&amp;quot;,
        item : ItemURL,
        templateId : workflowTemplateID,
        workflowParameters : &amp;quot;&amp;lt;root /&amp;gt;&amp;quot;,
        completefunc : function (data, status) {
          waitDialog.close();
          if (status == &amp;quot;error&amp;quot;) {
            alert(status + &amp;quot; : &amp;quot; + data.responseText);
          } else {
            document.location.reload();
          }
        }
      });
    }
  });
}
function certImg_onclick() {}

function ShowVersionHistory() {
  if (!_spPageContextInfo) {
    return;
  }
  var options = {
    tite : &amp;quot;Versions&amp;quot;,
    url : _spPageContextInfo.webServerRelativeUrl + &amp;quot;/_layouts/Versions.aspx?list=&amp;quot; + _spPageContextInfo.pageListId + &amp;quot;&amp;amp;ID=&amp;quot; + _spPageContextInfo.pageItemId,
    allowMaximize : false,
    showClose : true,
    width : 800,
    height : 500,
  };
  SP.UI.ModalDialog.showModalDialog(options);
}
</pre>
<p>&nbsp;</p>
<pre class="brush: xml; title: ; notranslate">
&lt;table style=&quot;width: 100%&quot;&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;img id=&quot;certImg&quot; alt=&quot;Page Certified Indicator&quot; src=&quot;&quot;
    onclick=&quot;return certImg_onclick()&quot; height=&quot;20px&quot;
    width=&quot;20px&quot; /&gt;Certified&lt;/td&gt;
    &lt;td&gt;
      &lt;a href=&quot;javascript:StartWorkflow(document.location, 'Super Stamp')&quot;&gt;
      Certify Process Page&lt;/a&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
      &lt;div&gt;
      &lt;img id=&quot;reviewImg&quot; alt=&quot;Page Review Indicator&quot; src=&quot;&quot;
      height=&quot;20px&quot; width=&quot;20px&quot; /&gt;Reviewed&lt;/div&gt;
    &lt;/td&gt;
    &lt;td&gt;
      &lt;a href=&quot;#&quot; onclick=&quot;javascript:ShowVersionHistory();&quot;&gt;View
      Modification History&lt;/a&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
    &lt;td&gt;
    &lt;img id=&quot;lastReviewedOnImg&quot;
    alt=&quot;Page Ready for Review Indicator&quot; src=&quot;&quot;
    onclick=&quot;return lastReviewedOnImg_onclick()&quot; height=&quot;20px&quot;
    width=&quot;20px&quot; /&gt;Ready for Review&lt;/td&gt;
    &lt;td&gt;
      &lt;a href=&quot;javascript:StartWorkflow(document.location, 'ReadyForReview')&quot;&gt;
      Ready for Review&lt;/a&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>As you can probably guess there is are a couple of parts to this txt file..</p>
<ol>
<li>The first being jquery switching the indicators depending on the rules set and the values of certain date fields.</li>
<li>The second part is using the client API where we are setting the ID of the SP group (note you can’t have any nested SP or AD groups here) that has access to this panel.. This then sets the DIV certifiedPanel display to show.</li>
<li>Part 3 is using SPServices <a href="http://spservices.codeplex.com/">http://spservices.codeplex.com/</a> to call Nintex Reusable Workflows that are bound to the custom content type that I am using for these Publishing Pages. As Nintex Workflow use the same infrastructure as SharePoint workflows, the rich feature set of <a href="http://spservices.codeplex.com/wikipage?title=StartWorkflow&amp;referringTitle=Workflow" target="_blank">SPServices,</a> allow me to start my Nintex Workflows and a whole host of other things.</li>
</ol>
<p>These workflows not only update the Page in question but also assign tasks to the review committee, and maintain a centralised list of all pages that are currently under review, / are due for review or don’t comply to the companies guidelines..</p>
<p>On approval of the task, the pages are certified within the companies “Processes” site. The JavaScript indicators reflect its new status, and the document is removed form the centralised management list.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=pEj3ECWl9lc:gxIBKfFhupQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/pEj3ECWl9lc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/18/spservices-stories-8-cewp-nintex-jquery-spservices-and-the-client-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/18/spservices-stories-8-cewp-nintex-jquery-spservices-and-the-client-api/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-8-cewp-nintex-jquery-spservices-and-the-client-api</feedburner:origLink></item>
		<item>
		<title>Goodbye Microsoft Messenger: Merge Skype and Microsoft Messenger Accounts</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/FSiDbLFTQzo/</link>
		<comments>http://sympmarc.com/2013/02/15/goodbye-microsoft-messenger-merge-skype-and-microsoft-messenger-accounts/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 18:02:31 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[LiveID]]></category>
		<category><![CDATA[Microsoft Account]]></category>
		<category><![CDATA[Microsoft Messenger]]></category>
		<category><![CDATA[Skype]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16515</guid>
		<description><![CDATA[This is a silly thing to need to post about, but I just spent about 15 minutes trying to figure it out, so I&#8217;m sure others will have the same trouble. I&#8217;ve read all about the impending merge of Skype and Microsoft Messenger. (See Skype and Messenger Coming Together: The Next Chapter) I figured I&#8217;d &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/15/goodbye-microsoft-messenger-merge-skype-and-microsoft-messenger-accounts/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>This is a silly thing to need to post about, but I just spent about 15 minutes trying to figure it out, so I&#8217;m sure others will have the same trouble.</p>
<p>I&#8217;ve read all about the impending merge of Skype and Microsoft Messenger. (See <a title="Skype and Messenger Coming Together: The Next Chapter" href="http://blogs.skype.com/2013/02/15/skype-and-messenger-coming-together-the-next-chapter" target="_blank">Skype and Messenger Coming Together: The Next Chapter)</a></p>
<p>I figured I&#8217;d get ahead of things and merge my two accounts now to get it over with. I&#8217;ve never been much of a Messenger user, so I&#8217;m not all that invested in it as an application. However, over the years I&#8217;ve collected some contacts there that I don&#8217;t want to lose.</p>
<p>I&#8217;ve been using Skype as a messaging application for years, though, so I&#8217;ve already got it all set up and I update it regularly.</p>
<p>I figured it would be easy to find out how to merge my two accounts, so I started looking around in Skype help. The best results I got were when I searched for &#8220;merge accounts&#8221;. However everything that I found was geared toward the &#8220;what happens when&#8230;&#8221; questions.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Skype-Merge-Accounts.jpg"><img class="aligncenter size-full wp-image-16516" alt="Skype Merge Accounts" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Skype-Merge-Accounts.jpg?resize=440%2C331" data-recalc-dims="1" /></a></p>
<p>I wasn&#8217;t interested in what happens, I just wanted to do it!</p>
<p>If that info is in Skype&#8217;s help, then I can&#8217;t find it. If it&#8217;s there, then it&#8217;s very well hidden.</p>
<p>I did find a blog post out there in the InterWebz (<a href="http://techdows.com/2012/11/merge-skype-and-messenger.html" target="_blank">How to Merge Skype and Windows Live Messenger Accounts into Microsoft Account </a>by Venkat eswarlu) that explained it, though, so I&#8217;m going to give the gist of it here. It&#8217;s actually pretty easy, once you know what to do.</p>
<p>Here are the steps:</p>
<ol>
<li>Be sure to update your copy of Skype. You may not have some of the bits you need if you are running an older version. To do this, simply go to Help / Check for Updates and follow the instructions.</li>
<li>Once Skype is running again, log out.</li>
<li>Log in with your Microsoft Account (nee LiveID) credentials
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-40-30.jpg"><img class="aligncenter size-full wp-image-16524" alt="Microsoft Account Login" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-40-30.jpg?resize=440%2C362" data-recalc-dims="1" /></a></li>
<li>Once you&#8217;ve logged in, you&#8217;ll be asked if you already have a Skype account. Since you already do, click the &#8220;I have a Skype account&#8221; button.
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-41-05.jpg"><img class="aligncenter size-full wp-image-16525" alt="Already have a Skype account?" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-41-05.jpg?resize=440%2C321" data-recalc-dims="1" /></a></li>
<li>Next, you&#8217;ll log in with your Skype credentials.
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-41-24.jpg"><img class="aligncenter size-full wp-image-16526" alt="Log in to your Skype Account" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-15-2013-13-41-24.jpg?resize=440%2C321" data-recalc-dims="1" /></a></li>
<li>Finally, you&#8221;ll see the prompt to merge your accounts.
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/merge-Skype-and-WL-Messenger-accounts.png"><img class="aligncenter size-full wp-image-16521" alt="Merge Skype and Microsoft Accounts" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/merge-Skype-and-WL-Messenger-accounts.png?resize=440%2C318" data-recalc-dims="1" /></a></li>
</ol>
<p>From this point forward, you should use your Microsoft Account to log into Skype.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=FSiDbLFTQzo:9jZH4pUxJLU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/FSiDbLFTQzo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/15/goodbye-microsoft-messenger-merge-skype-and-microsoft-messenger-accounts/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/15/goodbye-microsoft-messenger-merge-skype-and-microsoft-messenger-accounts/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=goodbye-microsoft-messenger-merge-skype-and-microsoft-messenger-accounts</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #7 – Example Uses of SPServices, JavaScript and SharePoint</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/XWlDQNOHm3Q/</link>
		<comments>http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/#comments</comments>
		<pubDate>Fri, 15 Feb 2013 15:01:17 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16501</guid>
		<description><![CDATA[This entry is part 7 of 13 in the series SPServices StoriesIntroduction I&#8217;ve been aware that John Liu (@johnnliu) is a fan of SPServices for some time now. He occasionally tweets about things he&#8217;s up to, and they always sound intriguing. Recently, I asked him if he&#8217;d like to share any of his own SPServices &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 7 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>I&#8217;ve been aware that John Liu (<a title="@johnnliu" href="http://twitter.com/johnnliu" target="_blank">@johnnliu</a>) is a fan of SPServices for some time now. He occasionally tweets about things he&#8217;s up to, and they always sound intriguing.</p>
<p>Recently, I asked him if he&#8217;d like to share any of his own SPServices Stories, and he did a <a title="Example uses of SPServices, JavaScript and SharePoint" href="http://johnliu.net/blog/2013/2/15/example-uses-of-spservices-javascript-and-sharepoint.html" target="_blank">post</a> for me on his blog. In the post, John shows three great examples of how you can slide SPServices under some truly impressive functionality that greatly improves the overall SharePoint user experience.</p>
<p>There&#8217;s another SPServices Story coming up from Dan Stoll (<a title="@_danstoll" href="http://twitter.com/_danstoll" target="_blank">@_danstoll</a>) which goes into some of the details on John&#8217;s first example below.</p>
<p>Without further ado, here&#8217;s John&#8217;s first SPServices Story. I expect that John will have a few more SPServices Stories to share with us over time.</p>
<h2>Example uses of SPServices, JavaScript and SharePoint</h2>
<p>I wanted to write about <a href="http://spservices.codeplex.com">spservices.codeplex.com</a> from <a href="https://twitter.com/sympmarc">Marc D Anderson</a> &#8211; we&#8217;ve found ourselves using this really special library time and again across different projects to talk back to SharePoint quickly.</p>
<h3>Starting Workflows</h3>
<p>Here&#8217;s a page from one of our Process Wiki articles.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-.png"><img class="aligncenter size-full wp-image-16504" alt="Process Wiki Example" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-.png?resize=440%2C197" data-recalc-dims="1" /></a></p>
<ul>
<li>We have a special &#8220;Contributor-only&#8221; Web Part on the right.</li>
<li>It shows the various workflow status&#8217; on the current page, as traffic light bubbles.</li>
<li>The &#8220;Certify Process Page&#8221; calls a JavaScript function that calls <a title="Workflow" href="http://spservices.codeplex.com/wikipage?title=Workflow" target="_blank">StartWorkflow via SPServices</a>.</li>
<li>The workflow is a Nintex workflow and triggers a significant multistage approval process.  But you can use StartWorkflow to start SharePoint workflows as well.</li>
</ul>
<h3>Getting List Data, Lots of List Data</h3>
<p>Here&#8217;s our task list, represented as a task board.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-1.png"><img class="aligncenter size-full wp-image-16505" alt="Task Dashboard" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-1.png?resize=440%2C252" data-recalc-dims="1" /></a></p>
<ul>
<li>This one is completely done with <a title="GetListItems" href="http://spservices.codeplex.com/wikipage?title=GetListItems" target="_blank">SPServices to get the list items</a></li>
<li>Convert the objects to JSON using <a title="SPXmlToJson" href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPXmlToJson" target="_blank">SPServices.SPXmlToJson</a></li>
<li>Then binding the objects to UI via <a title="KnochoutJS" href="http://knockoutjs.com/" target="_blank">Knockout</a></li>
<li>There&#8217;s jQuery UI&#8217;s drag and drop in play, so we can change the Task&#8217;s status by dragging the task across a different column.</li>
<li>Update task using <a title="UpdateListItems" href="http://spservices.codeplex.com/wikipage?title=UpdateListItems&amp;referringTitle=Lists" target="_blank">SPServices&#8217; UpdateListItems</a> call.</li>
<li>And some nice CSS.</li>
<li>This particular page also runs via SharePoint 2010&#8242;s OData listdata.svc, but is completely viable with SPServices on SP2007 as well.</li>
</ul>
<h3>Getting User Profiles via Search</h3>
<p>Here&#8217;s our People page.</p>
<p><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-2.png"><img class="aligncenter size-full wp-image-16506" alt="People Page" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/02/Windows-Live-Writer-Various-uses-of-SPServices-in-2012_A70E-2.png?resize=440%2C245" data-recalc-dims="1" /></a></p>
<ul>
<li>First, get SharePoint to index your people.</li>
<li>Use <a title="Search" href="http://spservices.codeplex.com/wikipage?title=Search" target="_blank">SPServices to call SharePoint search</a> to return a bunch of people, including their picture (one would say, especially their picture).</li>
<li>Here I use <a title="Knochout" href="http://knockoutjs.com/" target="_blank">Knockout</a> to render the pictures.  When clicked, each one opens that user&#8217;s My Site page.</li>
<li>There&#8217;s a filter box on the top right, as well as &#8220;fake&#8221; refinements on the left hand side that allows us to re-query SharePoint search for filtered people.</li>
<li>One possible idea here would be to use <a title="UserProfileService" href="http://spservices.codeplex.com/wikipage?title=UserProfileService" target="_blank">SPServices&#8217; User Profile Service</a> support and talk directly to the User Profile service if you want to skip the search service.</li>
</ul>
<h3>Summary</h3>
<p>A quick post of 3 recent JavaScript customizations that heavily used SPServices.  Hope that give you guys a lot of ideas.  Let me know what you guys think.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=XWlDQNOHm3Q:UdenOsdyy9U:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/XWlDQNOHm3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/15/spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-7-example-uses-of-spservices-javascript-and-sharepoint</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #6 – Custom Quizzing System</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/qlQeKL2GPwA/</link>
		<comments>http://sympmarc.com/2013/02/13/spservices-stories-6-custom-quizzing-system/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 15:49:21 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16446</guid>
		<description><![CDATA[This entry is part 6 of 13 in the series SPServices StoriesIntroduction Many times, SPServices Stories play out on the field of the Codeplex Discussions. As someone posts questions about how to build some of the components of their solution, the overall plan comes into focus. Over the last week or so, I&#8217;ve been helping Oli &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/13/spservices-stories-6-custom-quizzing-system/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 6 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Many times, <a title="SPServices Stories" href="http://sympmarc.com/series/spservices-stories/" target="_blank">SPServices Stories</a> play out on the field of the Codeplex Discussions. As someone posts questions about how to build some of the components of their solution, the overall plan comes into focus.</p>
<p>Over the last week or so, I&#8217;ve been helping Oli Howson (<a title="@Mr_Howson" href="http://twitter.com/Mr_Howson" target="_blank">@Mr_Howson</a>) in the discussions <a href="http://spservices.codeplex.com/discussions/432099" target="_blank">here</a> and <a href="http://spservices.codeplex.com/discussions/432399" target="_blank">here</a>. As the bits and pieces came to together for me, I thought that Oli&#8217;s work in progress would make a great SPServices Story, especially since he took the trouble to write up what he was trying to accomplish in the discussion thread.</p>
<p>Oli&#8217;s project is in process, and it&#8217;s certainly possible that he will make changes from here. However, I thought it would be useful to post things &#8220;as-is&#8221; so that everyone could see how he&#8217;s going about it. If he makes any significant changes, we&#8217;ll try to post them back as well.</p>
<p>If you have any comments for Oli about how you might do things differently, I&#8217;m sure he&#8217;d be interested. I know I would be.</p>
<p>Oli&#8217;s entire bespoke page is shown below, so you get to see the markup, the script, everything.</p>
<h2>Custom Quizzing System</h2>
<p>I am a teacher &#8211; running the ICT and Computer Science department of a South London Academy &#8211; we teach both disciplines to 11-18 year olds. For key-stage 3 (Y7, 8 and 9) we have for the last few years set homework on our VLE (Virtual Learning Environment) which had a built-in testing system. Due to that being about the only part of the VLE that wasn&#8217;t naff, it was recently retired and a new SharePoint system brought in. It&#8217;s got a few bespoke bits, and I am not an admin. Now I&#8217;m faced with the dilemma: I have 555-ish students needing their homework setting every week, I deliver all my learning resources via the SharePoint system, but there is no built-in quizzing system. Yes &#8211; there are surveys, but they don&#8217;t mark and have their own foibles. So I built this JavaScript-based quizzing system.</p>
<h3>Methodology</h3>
<p>The teacher in charge of setting homework that week creates a multiple-choice quiz on a stand-alone piece of client software I wrote in Delphi. This then creates an array string which it pastes into the quiz template (with a relevant name) and copies the file to the relevant document store in the SharePoint server. The teacher then just creates a link from the homework page to the relevant quiz, and when the kids hit the quiz the results go into the relevant list (created with the same name as the quiz). The difficult bit was making sure that the list was created the first time the quiz is run. The idea is the teacher hits the quiz once the link is up to make sure it has worked. When they submit, it creates the list, adds the columns, and updates the view. The second time it tests if the list exists (it does now!) and just inserts their score, which it also shows to the kids and then closes the window.</p>
<p>Well, I think I&#8217;m there! I&#8217;m going to get this beta tested by a group of Year 9 students tomorrow, but I&#8217;ll put the code below for reference to anyone that might find it interesting. I&#8217;m sure I&#8217;ve made loads of faux-pas as I&#8217;ve written a grand total of about three things in JavaScript, and have very limited knowledge of SharePoint.</p>
<p>Wheeee :)</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>Code update with Oli&#8217;s changes in version 1.1.0 on 2013-02-14</div>
<pre class="brush: xml; title: ; notranslate">
&lt;!doctype html&gt;

&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
 &lt;meta charset=&quot;utf-8&quot; /&gt;
 &lt;title&gt;jQuery UI Tabs - Default functionality&lt;/title&gt;
 &lt;link rel=&quot;stylesheet&quot; href=&quot;/mertonshared/computerstudies/homework/Documents/includes/jquery-ui.css&quot; /&gt;
 &lt;script language=&quot;javascript&quot; src=&quot;/mertonshared/computerstudies/homework/Documents/includes/jquery-1.8.1.js&quot;&gt;&lt;/script&gt;
 &lt;script language=&quot;javascript&quot; src=&quot;/mertonshared/computerstudies/homework/Documents/includes/jquery-ui.js&quot;&gt;&lt;/script&gt;
 &lt;script language=&quot;javascript&quot; src=&quot;/mertonshared/computerstudies/homework/Documents/includes/jquery.SPServices-0.7.2.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
 &lt;script&gt;
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Quizzer v1.0.2                                                                                //
 // Change Log:                                                                                   //
 //  - 1.1.0 Added check whether user has completed before - one try only. Reordered some actions //
 //          Added permissions setting when list is being created. Changed submit button value.   //
 //  - 1.0.2 Removed some pointless alerts for ordinary users, reenabled windows.close(), added   //
 //           some useful comments.                                                               //
 //  - 1.0.1 Added view change to show all fields                                                 //
 // Currently available:                                                                          //
 //  - Multiple choice                                                                            //
 //  - Unlimited questions                                                                        //
 //  - Four options per question                                                                  //
 // Future Plans                                                                                  //
 //  - Varying number of options per question                                                     //
 //  - Missing word completion                                                                    //
 //  - Include YouTube clip                                                                       //
 ///////////////////////////////////////////////////////////////////////////////////////////////////

 var startseconds;
 var filename;
 var score;
 var thisUserName;
 var previouslytried;

 function checkiflistexists() {
    //alert('checking existance of list: '+filename);
    $().SPServices ({
        operation: &quot;GetList&quot;,
        listName:  filename,
        completefunc: function (xData, Status) {
                //tp1 = xData.responseText;
                //alert(tp1);
                //alert(Status);
                if (Status == 'success') {
                    //alert ('Exists - dont create - just insert data');
                    insertdata();
                }
                else {
                    alert('Dont exist');
                    $().SPServices({
                        operation: &quot;AddList&quot;,
                        listName: filename,
                        description: &quot;List created for quiz: &quot;+filename,
                        templateID: 100,
                        completefunc: function (xData, Status) {
                            alert('Trying to create list');
                            alert(Status);
                            alert('Now add fields');
                            var nfields = &quot;&lt;Fields&gt;&lt;Method ID='1'&gt;&lt;Field Type='Text' DisplayName='Score' ResultType='Text'&gt;&lt;/Field&gt;&lt;/Method&gt;&lt;Method ID='2'&gt;&lt;Field Type='Text' DisplayName='TimeTaken' ResultsType='Text'&gt;&lt;/Field&gt;&lt;/Method&gt;&lt;Method ID='3'&gt;&lt;Field Type='Text' DisplayName='CompletedOn' ResultsType='Text'&gt;&lt;/Field&gt;&lt;/Method&gt;&lt;/Fields&gt;&quot;;
                            $().SPServices({
                                operation: 'UpdateList',
                                listName: filename,
                                newFields: nfields,
                                completefunc: function(xData, Status) {
                                    tp1 = xData.responseText;
                                    tp4 = tp1.indexOf(&quot;errorstring&quot;);
                                    if (tp4 &lt; 0) {
                                        alert(&quot;Fields created! - Update View&quot;);
                                        var viewname = &quot;&quot;;
                                        $().SPServices({
                                            operation: &quot;GetViewCollection&quot;,
                                            async: false,
                                            listName: filename,
                                            completefunc: function (xData, Status) {
                                                alert('Complete Func - GewViewCollection');
                                                $(xData.responseXML).find(&quot;[nodeName='View']&quot;).each(function() {
                                                    var viewdisplayname = $(this).attr(&quot;DisplayName&quot;);
                                                    if (viewdisplayname==&quot;AllItems&quot;) {
                                                        viewname = $(this).attr(&quot;Name&quot;);
                                                        return false;
                                                    }
                                                });
                                            }
                                        });
                                        alert('Ok - done GetViewCollection - now update the view');
                                        var viewfields = &quot;&lt;ViewFields&gt;&lt;FieldRef Name=\&quot;Title\&quot; /&gt;&lt;FieldRef Name=\&quot;Score\&quot; /&gt;&lt;FieldRef Name=\&quot;TimeTaken\&quot; /&gt;&lt;FieldRef Name=\&quot;CompletedOn\&quot; /&gt;&lt;/ViewFields&gt;&quot;;
                                        $().SPServices({
                                            operation: 'UpdateView',
                                            async: false,
                                            listName: filename,
                                            viewName: viewname,
                                            viewFields: viewfields,
                                            completefunc: function(xData, Status) {
                                                alert('Trying to update view');
                                                alert(Status);
                                                alert('Updated view - now update permissions');
                                                //insertdata();
                                                $().SPServices({
                                                    operation: 'AddPermission',
                                                    objectType: 'List',
                                                    objectName: filename,
                                                    permissionIdentifier: &quot;HARRISNET\\ham-grp-students&quot;,
                                                    permissionType: 'user',
                                                    permissionMask: 1011028719,
                                                    completefunc: function(xData, Status) {
                                                        alert('Trying to update permissions');
                                                        alert(Status);
                                                        alert(xData.responseXML.xml);
                                                        alert('Done... hopefully! - better insert the data!');
                                                        insertdata();
                                                    }
                                                });
                                            }
                                        });
                                    }
                                    else {
                                    // Error creating fields!
                                    alert(&quot;Error creating fields!&quot;);
                                    }
                                }
                            });
                        }
                    });
                }
            }
        });
 }

 function insertdata() {
    var endseconds = new Date().getTime() / 1000;
    endseconds = endseconds - startseconds;
    var d = new Date();
    var dd = d.toDateString();
    var dt = d.toTimeString();
    $().SPServices({
        operation: &quot;UpdateListItems&quot;,
        async: false,
        batchCmd: &quot;New&quot;,
        listName: filename,
        valuepairs: [[&quot;Title&quot;, thisUserName],[&quot;Score&quot;,score],[&quot;TimeTaken&quot;,Math.round(endseconds).toString()+&quot; seconds&quot;],[&quot;CompletedOn&quot;,dd+&quot; &quot;+dt]],
        completefunc: function (xData, Status) {
            //alert('Trying to add data');
            if (Status == 'success') {
                //inserted();
            }
            else {
                alert(Status+' : There was a problem inserting your score into the database. Please notify Mr Howson!');
                //inserted();
            }
        }
    });
    alert('You achieved a score of '+score);
    window.close();
 }

 function checkanswers() {
    var form = document.getElementById('answers');
    score = 0;
    for (var i = 0; i &lt; form.elements.length; i++ ) {
        if (form.elements[i].type == 'radio') {
            if (form.elements[i].checked == true) {
                if (questions[form.elements[i].name.substring(9)-1][questions[form.elements[i].name.substring(9)-1].length-1] == form.elements[i].value)
                {
                 score++;
                }
            }
        }
    }
  $(document).ready(function() {
    checkiflistexists();
  });
 }

 function initialise() {
    var rowcount = 0;
    startseconds = new Date().getTime() / 1000;
    var url = window.location.pathname;
    thisUserName = $().SPServices.SPGetCurrentUser({
        fieldName: &quot;Title&quot;,
        debug: false
    });
    filename = url.substring(url.lastIndexOf('/')+1);
    filename = filename.substring(0,filename.lastIndexOf('.'));
    //alert(filename);
    //alert('Getting items');
  $().SPServices({
    operation: &quot;GetListItems&quot;,
    async: false,
    listName: filename,
    CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name='Title' /&gt;&lt;FieldRef Name='Score' /&gt;&lt;/ViewFields&gt;&quot;,
    CAMLQuery: &quot;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;&quot;+thisUserName+&quot;&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&quot;,
    CAMLRowLimit: 1,
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function() {
        //var liHtml = &quot;&lt;li&gt;&quot; + $(this).attr(&quot;ows_Title&quot;) + &quot;&lt;/li&gt;&quot;;
        score = $(this).attr(&quot;ows_Score&quot;);
        //$(&quot;#tasksUL&quot;).append(liHtml);
        rowcount++;
      });
    }
  });
    //alert(rowcount);
    //alert('done');
  if (rowcount &gt; 0) {
   previouslytried = true;
   document.getElementById('tabs').style.visibility = 'hidden';
   alert('Sorry - you have already tried this quiz - one try only!\nLast time you got a '+score);
   window.close();
  }
  else {
   previouslytried = false;
  }
 }

 function inserted() {
    //window.close();
 }

 $(function() {
  $( &quot;#tabs&quot; ).tabs();
 });

 var questions = new Array;
  //The section below should be uncommented when not testing - this will be replaced by the client
  // side application with the questions array.
  [INSERTQUESTIONS]

 //The following questions can be uncommented for testing purposes
 //questions[0] = ['q1','a','b','c',1];
 //questions[1] = ['q2','d','e','f',2];
 //questions[2] = ['q3','g','h','i',3];
 &lt;/script&gt;
&lt;/head&gt;

&lt;body onload=&quot;initialise()&quot;&gt;
 &lt;div id=&quot;tabs&quot;&gt;
  &lt;ul&gt;
   &lt;script language=&quot;JavaScript&quot;&gt;
    for (var i = 0; i&lt; questions.length; i++)
    {
     document.write('&lt;li&gt;&lt;a href=&quot;#tabs-'+(i+1)+'&quot;&gt;Question '+(i+1)+'&lt;/a&gt;&lt;/li&gt;');
    }
    document.write('&lt;li&gt;&lt;a href=&quot;#tabs-'+(i+1)+'&quot;&gt;Summary&lt;/a&gt;&lt;/li&gt;');
   &lt;/script&gt;
  &lt;/ul&gt;
   &lt;form name=&quot;answers&quot; id=&quot;answers&quot;&gt;
   &lt;script language=&quot;JavaScript&quot;&gt;
    for (var i = 0; i &lt; questions.length; i++)
    {
     document.write('&lt;div id=&quot;tabs-'+(i+1)+'&quot;&gt;');
     document.write(' &lt;p&gt;'+questions[i][0]+'&lt;/p&gt;');
     for (var j = 1; j &lt; questions[i].length-1; j++)
     {
      document.write(' &lt;p&gt;&lt;input type=&quot;radio&quot; name=&quot;question-'+(i+1)+'&quot; value=&quot;'+j+'&quot;&gt;'+questions[i][j]+'&lt;br&gt;&lt;/p&gt;');
     }
     document.write('&lt;/div&gt;');
    }
    document.write('&lt;div id=&quot;tabs-'+(i+1)+'&quot;&gt;');
    document.write(' &lt;p&gt;&lt;input type=&quot;submit&quot; onclick=&quot;checkanswers(); return false;&quot; value=&quot;Submit Homework&quot;&gt;&lt;/p&gt;');
    document.write('&lt;/div&gt;');
  &lt;/script&gt;
  &lt;/form&gt;
 &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=qlQeKL2GPwA:ChZl32GDUTk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/qlQeKL2GPwA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/13/spservices-stories-6-custom-quizzing-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/13/spservices-stories-6-custom-quizzing-system/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-6-custom-quizzing-system</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #5 – Gritter and Sharepoint: Integrate Nifty Notifications in Your Intranet!</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/U0lRex8tshk/</link>
		<comments>http://sympmarc.com/2013/02/13/spservices-stories-5-gritter-and-sharepoint-integrate-nifty-notifications-in-your-intranet/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 05:59:46 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Gritter]]></category>
		<category><![CDATA[Growl]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16454</guid>
		<description><![CDATA[This entry is part 5 of 13 in the series SPServices StoriesIntroduction This SPServices Story comes to use from Rick El-Darwish (@RtfulDodg3r) in Geneva, Switzerland. For those of you who aren&#8217;t familiar with it, Gritter is a Growl-like notification jQuery plugin. That&#8217;s a mouthful, but try the links and you&#8217;ll quickly get the picture. If &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/13/spservices-stories-5-gritter-and-sharepoint-integrate-nifty-notifications-in-your-intranet/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 5 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>This <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> Story comes to use from Rick El-Darwish (<a title="@RtfulDodg3r" href="http://twitter.com/RtfulDodg3r" target="_blank">@RtfulDodg3r</a>) in Geneva, Switzerland. For those of you who aren&#8217;t familiar with it, <a title="Gritter" href="http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/" target="_blank">Gritter</a> is a <a title="Growl" href="http://growl.info/screenshots.php" target="_blank">Growl</a>-like notification <a title="jQuery" href="http://jQuery.com" target="_blank">jQuery</a> plugin. That&#8217;s a mouthful, but try the links and you&#8217;ll quickly get the picture. If you&#8217;re an OS X user, then you&#8217;ll recognize the capability right away.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/Proof-of-concept-Gritter-Sharepoint.png"><img class="aligncenter size-full wp-image-16470" alt="Proof of concept Gritter Sharepoint" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/Proof-of-concept-Gritter-Sharepoint.png?resize=386%2C186" data-recalc-dims="1" /></a><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Proof-of-concept-Gritter-Sharepoint-hover.png"><img class="aligncenter size-full wp-image-16469" alt="Proof of concept Gritter Sharepoint hover" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/Proof-of-concept-Gritter-Sharepoint-hover.png?resize=390%2C184" data-recalc-dims="1" /></a></p>
<p>Sure, SharePoint has a notification scheme built into it &#8211; <a title="Showing transient messages using the SharePoint 2010 Notification Area – SharePoint 2010 UI tip #2" href="http://blog.mastykarz.nl/showing-transient-messages-sharepoint-2010-notification-area/" target="_blank" rel="bookmark">Showing transient messages using the SharePoint 2010 Notification Area – SharePoint 2010 UI tip #2</a> (thanks, as always, <a title="@waldekm" href="http://twitter.com/" target="_blank">@waldekm</a>) &#8211; and there is at least one Codeplex project &#8211; <a title="SPNotifications" href="http://spnotifications.codeplex.com/" target="_blank">SPNotifications</a> - that provides similar functionality. However, the built-in notifications are limited in functionality and the SPNotifications requires server-side code. The script-based approach has a much smaller footprint and the content can easily be maintained by an end user. (Getting developers out of the mix with content ought to always be the goal.) Also, by using open source jQuery-based alternatives, you always have the option to expand the functionality to meet your own needs.</p>
<p>By using SPServices and Gritter together, Rick was able to create very user-friendly notifications on SharePoint pages which were driven by list-based content. Rick starts out with a simple example and shows you how to set up the list-driven approach. With a little extrapolation, I&#8217;m sure you will be able to see quite a few additional uses for this approach in your own environments.</p>
<p>You can see Rick&#8217;s <a title="Forensic Aspirations, Inferred Logic: Rick's tale of FAIL" href="http://failtal.es/gritter-and-sharepoint-notifications/" target="_blank">original post</a> on his blog, <a title="Forensic Aspirations, Inferred Logic: Rick's tale of FAIL" href="http://failtal.es/" rel="home">Forensic Aspirations, Inferred Logic: Rick&#8217;s tale of FAIL</a>.</p>
<h2>Gritter and Sharepoint: Integrate Nifty Notifications in Your Intranet!</h2>
<p>I’m working with a client on building up a project management tool in SharePoint; one thing that’s really piqued their interest is the concept of getting short flashes of information when their staff logs into the landing page. I think it’s a lovely idea, and I’m intend on giving them this functionality – but how, you might ask? There doesn’t seem to be any SharePoint feature for doing that!</p>
<p>We tend to forget that SharePoint is, above all, a web-based solution. This means that, with a little ingenuity (and sometimes a lot of sweat and blood), you can integrate some of the latest, coolest web features into your existing SharePoint. Fortunately, notifications are not too complicated. In this short article, we’re going to walk through creating very cool notifications using Gritter, a jQuery-based &#8220;plugin&#8221;, with Sharepoint.</p>
<h3>Step One: Create a Sandbox</h3>
<p>This may be as simple as creating a new page in your Site Pages repository. I seriously recommend implementing a proof-of-concept rather than work on your production page… If you’re not familiar with these libraries, the last place you want to test things out is on your production work, as easy as these implementations may seem.</p>
<p>Apart from your page, your sandbox will need a few extra files. These you can either place in the Site Assets repository of your PoC portal, or in the Site Assets repo of your root. The latter has the benefit of being accessible to your entire audience (or at least I assume so, it will depend on your permissions). The files that you need are the latest minified version of <a title="jQuery" href="http://jquery.com" target="_blank">jQuery</a>, the latest version of <a title="Gritter" href="http://boedesign.com/blog/2009/07/11/growl-for-jquery-gritter/" target="_blank">Gritter</a>, and the latest version of <a title="SPServices" href="http://spservices.codeplex.com/" target="_blank">SPServices</a> (double-check these pages for compatibility issues, of course – if Gritter or SPServices tell you that they won’t work with certain versions of jQuery, don’t use those versions…)</p>
<p>When downloading Gritter, you’ll notice that it is a zip file that has several folders and files. I recommend that you keep those in one single place in your Site Assets. I find it’s easiest to use SharePoint Designer to do that.</p>
<h3>Step Two: Add Your jQuery References</h3>
<p>Now that you have a sandbox, you can start working with it. In case you’re wondering, this section is assuming that you’re working with SharePoint Designer (SPD) to do your work.</p>
<p>Open your sandbox page in SPD, editing it in Advanced Mode. Locate the PlaceHolderMain placeholder and add the references to your script files:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!– Inserted by Rick – references to jQuery scripts –&gt;
&lt;!– These are the references to jQuery and SPServices. –&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;../SiteAssets/jquery-1.8.3.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;../SiteAssets/jquery.SPServices-0.7.2.min.js&quot;&gt;&lt;/script&gt;
&lt;!– These are the references to Gritter: –&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../SiteAssets/gritter/css/jquery.gritter.css&quot; /&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;../SiteAssets/gritter/js/jquery.gritter.min.js&quot;&gt;&lt;/script&gt;
&lt;!– End Rick insertions. –&gt;
</pre>
<p>You can test that the libraries loaded correctly by firing up Chrome, navigating to your PoC page, and opening your Console (F12). In the Console, type the following:</p>
<pre class="brush: jscript; title: ; notranslate">
$
$(document).SPServices
$.gritter
</pre>
<p>If any of these return ‘undefined’, review your references, make sure the files are uploaded in the correct location.</p>
<h3>Step Three: Setting up your notifications!</h3>
<p>OK, now we know that all the necessary libraries are loaded. Time to develop notifications. Always develop incrementally, testing your code one chunk at a time. To that effect, here’s code that you should insert after the above script blocks:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!– Here’s a test notification –&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready( function() {
  $.gritter.add({
    title: &quot;This is a test notification&quot;,
    text: &quot;This will fade after some time&quot;
  });
});
&lt;/script&gt;
</pre>
<p>If that works, you know that Gritter is functional for static content! Now it’s time to pull the real notifications from a list — this is where SPServices comes in. Before we proceed, we need something to pull information from: create a custom list with a single title for your PoC, “Latest Activities” for instance. Then, you will call the GetListItems function using SPServices.</p>
<p>The following code replaces your test notification:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!– Code for notifications –&gt;
&lt;script type=&quot;text/javascript&quot;&gt;

//This function throws up the notification:
function notify(curTitle, curContent) {
  $.gritter.add({
    title: curTitle,
    text: curContent
  });
}

//This retrieves the latest item of your Latest Activities.
function getLastActivity() {
  $(document).SPServices({
    operation: &quot;GetListItems&quot;,
    async: false,
    listName: &quot;Latest Activities&quot;,
    CAMLRowLimit: 1,
    CAMLQuery: &quot;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name=’Created’ Ascending=’False’ /&gt;&lt;/OrderBy&gt;&lt;/Query&gt;&quot;,
    CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name=’Title’ /&gt;&lt;/ViewFields&gt;&quot;,
    completefunc: function(xData, Status) {
      $(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function() {
        notify(‘For your information…’, $(this).attr(&quot;ows_Title&quot;));
      });
    }
  });
}

//On document load, throw up the notification:
$(document).ready( function() {
  getLastActivity();
});
&lt;/script&gt;
</pre>
<p>Et voilà — Gritter and SharePoint notifications in a nutshell! Your page will load and, once loaded, will call the getLastActivity function. getLastActivity pulls the latest item from the Latest Activities list (we use the CAMLQuery parameter to order by create date, and the CAMLRowLimit parameter to only return one parameter), and use a callback function to call the notify() function. The notify function is what is responsible for rendering the Gritter notification.</p>
<p>Happy notifying!</p>
<p>Rick.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=U0lRex8tshk:akujzSMX2R0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/U0lRex8tshk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/13/spservices-stories-5-gritter-and-sharepoint-integrate-nifty-notifications-in-your-intranet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/13/spservices-stories-5-gritter-and-sharepoint-integrate-nifty-notifications-in-your-intranet/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-5-gritter-and-sharepoint-integrate-nifty-notifications-in-your-intranet</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #4 – Using SPServices to Process Files from a Non-Microsoft Source</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/Qifwp_jLr4s/</link>
		<comments>http://sympmarc.com/2013/02/07/spservices-stories-4-using-spservices-to-process-files-from-a-non-microsoft-source/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 20:35:26 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16392</guid>
		<description><![CDATA[This entry is part 4 of 13 in the series SPServices StoriesIntroduction SPServices Stories #4 comes to us from Michael Broschat. Michael claims he&#8217;s just a &#8220;regular old contractor, nothing special&#8221;. He lives in the DC metro area (Northern Virginia, specifically), although he&#8217;s originally a West Coast boy. Using SPServices to Process Files from a &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/07/spservices-stories-4-using-spservices-to-process-files-from-a-non-microsoft-source/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 4 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p><a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> Stories #4 comes to us from Michael Broschat. Michael claims he&#8217;s just a &#8220;regular old contractor, nothing special&#8221;. He lives in the DC metro area (Northern Virginia, specifically), although he&#8217;s originally a West Coast boy.</p>
<h2>Using SPServices to Process Files from a Non-Microsoft Source</h2>
<p>Our system involves email messages sent to a SharePoint library by a non-Microsoft forms application. Although this particular application normally saves its results as XML files, it cannot _send_ those results anywhere (say, the SharePoint library). It can send the results as delimited strings, however, without field names.</p>
<p>I developed a scheme whereby I provide the field structure in an array (arFields) then match it with the field values derived from the delimited-string email. I then write same to a list.</p>
<p>So, three steps in a four-step process have email looking something like this:</p>
<pre class="brush: xml; title: ; notranslate">
smithxx@us.here*BP*11/01/2012*11/19/2012*18*1 - Sent to Supervisor
</pre>
<p>The final step contains much more information, for a total of 25 fields. The endpoint list includes all 25 fields, of course. Typically, a user entry will comprise four entries but accommodation must also be made for changes made while the four-step process operates. Once a step 4 has been received, any further attempts to augment this process for that user are ignored.</p>
<p>This JavaScript code (with SPServices, jQuery) runs via an enabling button on the list display page. But even before the button appears, the first routine has run. This routine looks in the library for any entries that have not yet been exported. If any, the button is enabled and its label includes the number of records to read and create in an associated list.</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
  jQuery.support.cors = true;
  $().SPServices({
    operation:  &quot;GetListItems&quot;,
    listName: &quot;{D3795486-9926-424E-8F14-59BE5DB65BA8}&quot;,	//dev  GFSSEForm
    CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name='LinkFilename'/&gt;&lt;FieldRef Name='Exported' /&gt;&lt;/ViewFields&gt;&quot;,
    completefunc: function (xData, Status) {
      $(xData.responseXML).SPFilterNode('z:row').each(function() {
        var thisFSObjType = parseInt($(this).attr(&quot;ows_FSObjType&quot;).split(&quot;;#&quot;)[1]);
        if(thisFSObjType === 0) {
          if(parseInt($(this).attr(&quot;ows_Exported&quot;))===0) iRecordsToExport++;
        }  //if this is a file name
      });  //each()
      if(iRecordsToExport &gt; 0) {
        $(&quot;#btnInitiate&quot;).html('There are ' + iRecordsToExport + ' records to export...');
        $(&quot;#btnInitiate&quot;).prop('disabled', false);
      } else {
        $(&quot;#btnInitiate&quot;).html('No records to export...'); //evidently, once we're off IE7
        $(&quot;#btnInitiate&quot;).prop('disabled', true);
      }
    }  //completefunc
  });  //SPServices
});  //document.ready
</pre>
<p>When the Records to Export button is launched, more or less the same code runs again, but this time I want to see only those email entries that have not already been dealt with (ie, Exported = false). This is done via CAML. I collect the library IDs of all items I&#8217;m writing in this batch (by the way, there is an interesting distinction between dealing with a batch and dealing with the set of records already written to the list), along with a couple other values, and create an array of IDs. The rest of the processing in this application is from that array.</p>
<pre class="brush: jscript; title: ; notranslate">
return {
  //the only public method; handler for the web page button (enabled when at least one library item has not been exported)
  processRecord: function () {
    //this filter restricts the selection just to items that haven't been exported;
    var myQueryOptions = &quot;&lt;QueryOptions /&gt;&quot;;
    var myQuery = &quot;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name='Created_x0020_Date' /&gt;&lt;/OrderBy&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='Exported' /&gt;&lt;Value Type='Integer'&gt;0&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&quot;;
    // now sorts by Created, ascending.
    $().SPServices({
      operation:  &quot;GetListItems&quot;,
      async: false,
      listName: &quot;{D3795486-9926-424E-8F14-59BE5DB65BA8}&quot;,	//dev  GFSSEForm
      CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name='LinkFilename'/&gt;&lt;FieldRef Name='Exported' /&gt;&lt;/ViewFields&gt;&quot;,
      CAMLQuery: myQuery,
      CAMLQueryOptions: myQueryOptions,
      completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode('z:row').each(function() {
          //pick up some metadata from the SharePoint library
          //gather ows_ID='14', ows_FSObjType='14;#0', ows_Created_x0020_Date='14;#2012-11-20 06:55:13'
          var thisFSObjType = parseInt($(this).attr(&quot;ows_FSObjType&quot;).split(&quot;;#&quot;)[1]);
          idCurrent = $(this).attr(&quot;ows_ID&quot;);	//available globally
          dateCurrentCreated = $(this).attr(&quot;ows_Created_x0020_Date&quot;).split(&quot;;#&quot;)[1];	//available globally
          var formFilename = $(this).attr(&quot;ows_LinkFilename&quot;);
          if(thisFSObjType == 0) {
            arIDs.push([idCurrent, dateCurrentCreated, formFilename]);
          }  //if this is a file name
        });  //each(); arIDs is an array built from looking at all non-Exported items in the library
        //actually, you need to know the contents before you can decide whether there are any duplicate entries.
        //	ordering by Created, we're processing all entries in order of their entry into the library
      }  //completefunc
    });  //SPServices
    //here, do the Ajax call against the array of arrays; async:false is no longer used with $.ajax, deferred
    //	taking over that function; 2 Jan took the following routine out from completefunc; seems to save a stack level
    $.each(arIDs, function(index, value) {
      var promise = $.ajax({
        type:&quot;GET&quot;,
        url:&quot;GFSSEForm/&quot; + arIDs[index][2],		//for SP2010 and above, full path is needed for the library name
        dataType:&quot;text&quot;
      });
      //the promise code executes when the file has been opened by AJAX
      promise.done(doStuff);	//magically passes the data along, too
      promise.fail(function() {alert(&quot;failed to open this eform: &quot; + arIDs[index][2]);});
    });  //each
  }
};	// public method processRecord() [return]
</pre>
<p>By this point, the email file in the SharePoint library has been opened and its contents are ready to process.</p>
<p>There are two ways for email to get into the library: sent by the non-Microsoft forms application and sent directly via a client&#8217;s Outlook. The former way gets encoded (binary64), whereas the latter way does not. Both must be parsed for usable content but the encoded email must first be decoded. I use the following routine to handle both:</p>
<pre class="brush: jscript; title: ; notranslate">
//	Sets the global variable: arValues; deals with both base64-encoded email and also non-encoded email
//	CRLF = \r\n
function decodeEmail(block) {
  var iBase64 = block.indexOf(&quot;base64&quot;);
  if(iBase64 &gt; -1) {
    var startBlock = iBase64 + 6;
    var endBlock = block.indexOf(&quot;\n--&quot;, startBlock);
    var emailBlock = $.trim(block.substring(startBlock, endBlock));
    var strEmail = emailBlock.replace(new RegExp(&quot;\\n&quot;, &quot;g&quot;), &quot;&quot;);
    var strDecoded = Base64.decode(strEmail);
    strDecoded = stripHTML(strDecoded);
    var iLong = strDecoded.indexOf(&quot;\r\n\r\n&quot;);	//intended for non-SMTP messages
    if(iLong &gt; -1) {
      //take up to first \r\n
      strDecoded = strDecoded.substring(0,iLong+2);
    }
    arValues = strDecoded.split(&quot;*&quot;);
  } else {
    //	charset=&quot;us-ascii&quot;; charset=utf-8; charset=&quot;gb2312&quot;
    //here if there was no &quot;base64&quot; in the message; perhaps you should look for [charset=&quot;]us-ascii[&quot;]
    // this routine greatly strengthened 24 Jan 2012
    var iTrueStart = block.indexOf(&quot;quoted-printable&quot;);	//24 Jan fine; whole routine looks good
    var iTrueStart2 = iTrueStart + 16;
    var endBlock = block.indexOf(&quot;\n--&quot;, iTrueStart);
    var strBlock2 = $.trim(block.substring(iTrueStart2, endBlock));
    var newBlock = strBlock2.replace(&quot;=\r\n&quot;, &quot;&quot;);		//kill all CRLFs
    var newBlock2 = newBlock.replace(/\&lt;.*\&gt;/g, &quot;&quot;);  //a weird &lt;mailto...&gt; string in one message
    //you could have just called your own stripHTML()!
    var newBlock3 = newBlock2.replace(/=\r\n/g, &quot;&quot;);	//one last holdout: =CRLF
    arValues = newBlock3.split(&quot;*&quot;);

  }
}
</pre>
<p>In my experience, getting values from functions does not always work within this environment (JavaScript within SharePoint). I have had to rely upon global variables (which have created their own problems at times). When that email decoding code runs, it places the parsed values into a global array: arValues, which is then used by the various routines that follow.</p>
<p>doStuff runs when the promise has been fulfilled. In other words, it only runs when data from the email is in hand. It sends the record off to writeNew or, if the number of field values does not match the current field template, stops the record from being processed.</p>
<pre class="brush: jscript; title: ; notranslate">
function doStuff(data) {
  decodeEmail(data);	//sets global arValues, regardless of email type
  arFields = [];	//to ensure correct value within the batch loop
  if(arValues.length == 7) arFields = arFields100;
  if(arValues.length == 25) arFields = arFields200;
  if(arFields.length &gt; 0) {
    boolIgnore = false;	//ensures correct starting point for each email
    iGlobal++;
    arValues[2] = dateFormat(arValues[2]);	//watch for changes in this default field order
    arValues[3] = dateFormat(arValues[3]);
    if(arValues.length === arFields.length) {
      var strArguments = arValues.join();
      writeNew(strArguments);	//wait until this routine before handling a dupe;
    } else alert(&quot;Number of values differed from number of form fields; not written.&quot; + arFields.length + &quot; fields, &quot; + arValues.length + &quot; values (&quot; + arValues + &quot;)&quot;);
  } // was arFields set? If not, just return and let it pass
}  // doStuff()
</pre>
<p>writeNew simply uses SPServices to write the email contents to the list. It does this by preparing an array value to contain the values in the proper manner for UpdateListItems::New. After writing the record, I call setUpdated to modify the library entry, passing the library ID, which setUpdated uses to access the library metadata.</p>
<pre class="brush: jscript; title: ; notranslate">
// strArguments is arValues rendered as string
function writeNew(strArguments) {
  $(&quot;#divId&quot;).ajaxError( function(event, request, settings, exception) {
    $(this).append(&quot;Error here: &quot; + settings.url + &quot;, exception: &quot; + exception);
  });
  var iFields = arFields.length;
  var i = 0;
  var strTest = &quot;&quot;;
  var strField = &quot;&quot;;
  var vpairs = [];
  var strPairs = &quot;&quot;;
  var arValues2 = strArguments.split(',');
  for(i=0; i&lt;iFields; i++) {
    strTest = String(arValues2[i]);
    if(strTest.length &gt; 255) strTest = strTest.substring(0,255);
    strField = arFields[i];
    vpairs.push([strField,strTest]);
  }
  //check to see whether this email address is in HoldMe; if so, processing stops, but run setUpdated(arIDs[idIndex][0]) and advance the index
  notInHoldMe(vpairs[0][1]);	//sets global value regarding presence in HoldMe list
  if(!inHoldMe) {
    var jsDate = getJSDate();		//picks up date values from arValues
    vpairs[4][1]=jsDate;
    $().SPServices({
      operation: &quot;UpdateListItems&quot;,
      batchCmd: &quot;New&quot;,
      async: false,
      listName: &quot;{2D9F4CDB-A5F0-4EED-8996-C26FB2D08294}&quot;,  //development list GFSSVerified
      valuepairs: vpairs,
      completefunc: function(xData, Status) {
        if(Status == 'success') {
          //'success' is a relative term; you must also examine any error text, to see whether an error occurred
          var strError = $(xData.responseXML).SPFilterNode('ErrorText').text();
          if(strError != &quot;&quot;) {
            $(&quot;#showErrors&quot;).append(&quot;&lt;p&gt;Error adding: &quot; + $(xData.responseXML).SPFilterNode('z:row').attr(&quot;ows_Title&quot;) + &quot; &quot; + strError + &quot;&lt;/p&gt;&quot;);
          } else setUpdated(arIDs[idIndex][0]);  //possibly delete the row at this point
          idIndex++;
          if(vpairs[6][1].substring(0,1) == &quot;4&quot;) setLocked(vpairs[0][1]);	// ie, after writing Step 4
          //record has been written; now find out whether it was a duplicate
          else findExisting(vpairs[0][1], vpairs[6][1].substring(0,1));
        } else alert(&quot;error: &quot; + xData.responseText);
      }	//completefunc
    }); //SPServices
  }	//if not locked
  else {
    alert(&quot;The record for &quot; + vpairs[0][1] + &quot; is locked...&quot;);
    setUpdated(arIDs[idIndex][0]);
    idIndex++;
  }
}  // writeNew()
</pre>
<p>All records are to be written to the list, but it will happen that some records are duplicates (because a later action changes the previous action). In that case, the earlier record needs to be marked as &#8216;orphan&#8217;. The original idea was to simply delete the record but someone wanted to keep it. Therefore, I need to filter orphans from various stages of processing. The routine called findExisting deals with this issue. I use CAML to filter orphans.</p>
<pre class="brush: jscript; title: ; notranslate">
function findExisting(user, action) {
  $(&quot;#divId&quot;).ajaxError( function(event, request, settings, exception) {
    $(this).append(&quot;Error in findExisting: &quot; + settings.url + &quot;, exception: &quot; + exception + &quot;&lt;br&gt;&quot;);
  });
  var queryOptions = &quot;&lt;QueryOptions /&gt;&quot;;
  var query = &quot;&lt;Query&gt;&lt;Where&gt;&lt;And&gt;&lt;And&gt;&lt;Eq&gt;&lt;FieldRef Name='Title' /&gt;&lt;Value Type='Text'&gt;&quot; + user + &quot;&lt;/Value&gt;&lt;/Eq&gt;&lt;BeginsWith&gt;&lt;FieldRef Name='col07x' /&gt;&lt;Value Type='Text'&gt;&quot; + action + &quot;&lt;/Value&gt;&lt;/BeginsWith&gt;&lt;/And&gt;&lt;Neq&gt;&lt;FieldRef Name='col26x' /&gt;&lt;Value Type='Integer'&gt;1&lt;/Value&gt;&lt;/Neq&gt;&lt;/And&gt;&lt;/Where&gt;&lt;/Query&gt;&quot;;  //col26x is 'Orphan'
  //CAML looks for existing items having same name and action, ignoring any that have already been marked as orphans
  $().SPServices({
    operation:  &quot;GetListItems&quot;,
    async: false,		//required!!!!!
    listName: &quot;{2D9F4CDB-A5F0-4EED-8996-C26FB2D08294}&quot;,  //development list GFSSVerified
    CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name='Title'/&gt;&lt;/ViewFields&gt;&quot;,
    CAMLQuery: query,
    CAMLQueryOptions: queryOptions,
    completefunc: function (xData, Status) {
      var iCount = parseInt($(xData.responseXML).SPFilterNode(&quot;rs:data&quot;).attr(&quot;ItemCount&quot;));
      if(iCount &gt; 1) {	//you're here because this value _at least_ was written
        //within this batch, there are multiples of this user/action; pass the multiple IDs
        var arDupIDs = [];
        var iDupID = 0;
        // routine examines each entry in arDupIDs, and replaces any value with lesser; ends up with earliest entry, which is then orphaned
        // limitation here is that it only--practically speaking--handles two instances; three or more would lose all but one
        $(xData.responseXML).SPFilterNode('z:row').each(function() {
          iDupID = parseInt($(this).attr(&quot;ows_ID&quot;));
          arDupIDs.push(iDupID);
          if(arDupIDs.length &gt; 1) {
            if(iDupID &lt; arDupIDs[0]) arDupIDs[0] = iDupID;
          }
        });
        orphanGFSSRow(arDupIDs[0]);
      }	// if at least one
    }	//completefunc
  });  //SPServices
}	//findExisting()
</pre>
<p>The completefunc routine looks only at items that have duplicates. It determines the earliest item, then sends off its ID for marking as orphan.</p>
<p>SPServices is also used to lock an account (by placing the email address in a separate list), by checking for existence of the email address currently being processed in the Locked list. One function sets the lock, while notInHoldMe() queries the lock list.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=Qifwp_jLr4s:nsBYa3OjCj8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/Qifwp_jLr4s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/07/spservices-stories-4-using-spservices-to-process-files-from-a-non-microsoft-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/02/07/spservices-stories-4-using-spservices-to-process-files-from-a-non-microsoft-source/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-4-using-spservices-to-process-files-from-a-non-microsoft-source</feedburner:origLink></item>
		<item>
		<title>SusQTech “30 on Thursday” Webinar “Top 10 jQuery Uses in SharePoint 2010″</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/2j7SJrnMFus/</link>
		<comments>http://sympmarc.com/2013/02/07/susqtech-30-on-thursday-webinar-top-10-jquery-uses-in-sharepoint-2010/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 19:57:51 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16397</guid>
		<description><![CDATA[I want to thank the fine folks at SusQTech (@SusQTech) &#8211; Steve Witt (@SPLumberjack) and Julia Oates (@juliaoates), in particular &#8211; for asking me to present in their &#8220;30 on Thursday&#8221; webinar series today. We had a great turn out and it&#8217;s a given that I love to talk about SharePoint and jQuery together. It&#8217;s like &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/07/susqtech-30-on-thursday-webinar-top-10-jquery-uses-in-sharepoint-2010/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.susqtech.com/Webinars/Pages/webinars.aspx"><img class="aligncenter size-full wp-image-16411" alt="“30 on Thursdays”" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-7-2013-14-57-47.jpg?resize=440%2C81" data-recalc-dims="1" /></a></p>
<p>I want to thank the fine folks at <a title="SusQTech" href="http://www.susqtech.com" target="_blank">SusQTech</a> (<a title="@SusQTech" href="http://twitter.com/SusQTech" target="_blank">@SusQTech</a>) &#8211; Steve Witt (<a title="@SPLumberjack" href="http://twitter.com/SPLumberjack" target="_blank">@SPLumberjack</a>) and Julia Oates (<a title="@juliaoates" href="http://twitter.com/juliaoates" target="_blank">@juliaoates</a>), in particular &#8211; for asking me to present in their &#8220;30 on Thursday&#8221; webinar series today.</p>
<p>We had a great turn out and it&#8217;s a given that I love to talk about SharePoint and <a title="jQuery" href="http://jquery.com" target="_blank">jQuery</a> together. It&#8217;s like <a title="peas and carrots" href="http://movieclips.com/sjvh7-forrest-gump-movie-peas-and-carrots/64.64/69.98/" target="_blank">peas and carrots</a> or <a title="chocolate and peanut butter" href="http://youtu.be/DJLDF6qZUX0" target="_blank">chocolate and peanut butter</a>.</p>
<p>My slides from the webinar are available on SlideShare. If you missed it, the recording will be available soon on the <a title="30 on Thursday" href="http://www.susqtech.com/Webinars/Pages/webinars.aspx" target="_blank">&#8220;30 on Thursday&#8221; site</a>. (Every time I type &#8220;30 on Thursday&#8221; I&#8217;m reminded how long ago it was that I was 30.)</p>
<p style="text-align: center;"><iframe style="border-width: 1px 1px 0px; border-style: solid; border-color: #cccccc; margin-bottom: 5px;" src="http://www.slideshare.net/slideshow/embed_code/16408117?rel=0" height="421" width="512" allowfullscreen="" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<div style="text-align: center; margin-bottom: 5px;"><strong> <a title="Top 10 jQuery Uses in SharePoint 2010" href="http://www.slideshare.net/sympmarc/top-10-jquery-uses-in-sharepoint-2010" target="_blank">Top 10 jQuery Uses in SharePoint 2010</a> </strong> from <strong><a href="http://www.slideshare.net/sympmarc" target="_blank">Marc D Anderson</a></strong></div>
<p style="text-align: center;"><!-- tweet id : 299592557556535296 --><style type='text/css'>#bbpBox_299592557556535296 a { text-decoration:none; color:#0084B4; }#bbpBox_299592557556535296 a:hover { text-decoration:underline; }</style><div id='bbpBox_299592557556535296' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#FFFFFF; background-image:url(http://a0.twimg.com/images/themes/theme1/bg.png); background-repeat:no-repeat'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#333333; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>"Maybe it's old school... but I'm old and I went to school." -- Marc Anderson aka @<a href="http://twitter.com/intent/user?screen_name=sympmarc" class="twitter-action">sympmarc</a></span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://i2.wp.com/sympmarc.com/wp-content/plugins/twitter-blackbird-pie//images/bird.png?w=440' data-recalc-dims="1" /><a title='tweeted on February 7, 2013 2:56 pm' href='http://twitter.com/#!/EUSP/status/299592557556535296' target='_blank'>February 7, 2013 2:56 pm</a> via <a href="http://www.tweetdeck.com" rel="nofollow" target="blank">TweetDeck</a><a href='https://twitter.com/intent/tweet?in_reply_to=299592557556535296&related=sympmarc' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=299592557556535296&related=sympmarc' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=299592557556535296&related=sympmarc' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=EUSP'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://i0.wp.com/a0.twimg.com/profile_images/2328209400/lin7gl9pxxzce37rxjp2_normal.png?w=440' data-recalc-dims="1" /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=EUSP'>@EUSP</a><div style='margin:0; padding-top:2px'>Mark Miller</div></div><div style='clear:both'></div></div></div><!-- end of tweet --></p>
<p style="text-align: center;"><iframe src="http://www.youtube.com/embed/pC3MbbmyMC4" height="315" width="420" allowfullscreen="" frameborder="0"></iframe></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=2j7SJrnMFus:j2lfRY9UkFM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/2j7SJrnMFus" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/07/susqtech-30-on-thursday-webinar-top-10-jquery-uses-in-sharepoint-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/07/susqtech-30-on-thursday-webinar-top-10-jquery-uses-in-sharepoint-2010/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=susqtech-30-on-thursday-webinar-top-10-jquery-uses-in-sharepoint-2010</feedburner:origLink></item>
		<item>
		<title>Referencing jQuery, jQueryUI, and SPServices from CDNs – Revisited</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/R29Y0Xz9wvc/</link>
		<comments>http://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 17:03:57 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[cdnjs]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16393</guid>
		<description><![CDATA[In my previous post entitled Referencing jQuery, jQueryUI, and SPServices from CDNs, I provided the references to quickly add jQuery, jQueryUI, and SPServices from the CDNs I typically use. However, I made a bit of a faux pas in what I provided. It&#8217;s better to omit the protocol in the references. Browsers will simply use &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>In my previous post entitled <a title="Referencing jQuery, jQueryUI, and SPServices from CDNs" href="http://sympmarc.com/2012/04/20/referencing-jquery-jqueryui-and-spservices-from-cdns/">Referencing jQuery, jQueryUI, and SPServices from CDNs</a>, I provided the references to quickly add jQuery, jQueryUI, and SPServices from the CDNs I typically use.</p>
<p>However, I made a bit of a faux pas in what I provided. It&#8217;s better to omit the protocol in the references. Browsers will simply use the current protocol, whether it be http: or https:, as needed. This means that you won&#8217;t have to worry about any issues down the road should you decide to implement SSL. It also means that the location your user happens to use to access the site doesn&#8217;t matter.</p>
<p>Here&#8217;s my updated set of references with the protocols omitted and updated to the versions I&#8217;m currently using:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- Reference the jQueryUI theme's stylesheet on the Google CDN. Here we're using the &quot;Start&quot; theme --&gt;
&lt;link  type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/themes/start/jquery-ui.css&quot; /&gt;
&lt;!-- Reference jQuery on the Google CDN --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- Reference jQueryUI on the Google CDN --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
&lt;!-- Reference SPServices on cdnjs (Cloudflare) --&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//cdnjs.cloudflare.com/ajax/libs/jquery.SPServices/0.7.2/jquery.SPServices-0.7.2.min.js&quot;&gt;&lt;/script&gt;
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=R29Y0Xz9wvc:YapJKZthdpk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/R29Y0Xz9wvc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/07/referencing-jquery-jqueryui-and-spservices-from-cdns-revisited/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=referencing-jquery-jqueryui-and-spservices-from-cdns-revisited</feedburner:origLink></item>
		<item>
		<title>SPServices Compatibility Issues with jQuery 1.9.1</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/pEBgakP9LeY/</link>
		<comments>http://sympmarc.com/2013/02/05/spservices-compatibility-issues-with-jquery-1-9-1/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 21:03:40 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16358</guid>
		<description><![CDATA[Ouch. Last week, several alert SPServices users reported issues with jQuery 1.9.0. (See: SPServices Compatibility Issues with the Minified Version of jQuery 1.9.0) It turned out that the minified version of 1.9.0 had a comment at the end of it that caused any jQuery library which followed it to throw errors. Today, I had a &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/05/spservices-compatibility-issues-with-jquery-1-9-1/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://blog.jquery.com/2013/02/04/jquery-1-9-1-released/"><img class="alignright size-full wp-image-16359" alt="Download jQuery 1.9.1" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/02/2-5-2013-15-59-04.jpg?resize=348%2C78" data-recalc-dims="1" /></a>Ouch. Last week, several alert <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> users reported issues with jQuery 1.9.0. (See: <a title="SPServices Compatibility Issues with the Minified Version of jQuery 1.9.0" href="http://sympmarc.com/2013/01/29/spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0/">SPServices Compatibility Issues with the Minified Version of jQuery 1.9.0</a>) It turned out that the minified version of 1.9.0 had a comment at the end of it that caused any jQuery library which followed it to throw errors.</p>
<p>Today, I had a report of SPServices not working with jQuery 1.9.1, which was released yesterday.</p>
<p>There&#8217;s a bug in the jQuery bug tracker called <a title="Ajax request not returning responseXML" href="http://bugs.jquery.com/ticket/13388" target="_blank">Ajax request not returning responseXML</a> that sums up the issue well. Not everyone uses the <a title="jQuery ajax" href="http://api.jquery.com/jQuery.ajax/" target="_blank">.ajax()</a> function in jQuery, but if you use SPServices, you&#8217;re using it constantly whether you realize it or not. Since there is no responseXML object returned by 1.9.1, every call to SharePoint&#8217;s SOAP Web Services in SPServices will fail.</p>
<p>Needless to say, don&#8217;t update to jQuery 1.9.1.</p>
<p>If there&#8217;s a bright side in all of this, it&#8217;s that the issues with jQuery 1.9.0 and 1.9.1 aren&#8217;t issues in SPServices or in the way I&#8217;ve coded anything. As I said in a forum earlier today, before I knew about the 1.9.1 bug:</p>
<blockquote><p>Don&#8217;t ever point to &#8216;latest&#8217;. There are frequently changes in new versions that break perfectly fine old code.</p></blockquote>
<p>While most of the mainstream CDNs provide ways to point to the current version of script libraries, e.g., jQuery.latest.min.js, don&#8217;t be tempted. These latest two versions of jQuery would have broken all of the SPServices-based code in your SharePoint installations. Make that a part of your governance: no pointing to &#8216;latest&#8217; versions of script libraries.</p>
<p>Herre&#8217;s hoping that 1.9.2 is a better release.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=pEBgakP9LeY:k5WitmPecWI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/pEBgakP9LeY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/05/spservices-compatibility-issues-with-jquery-1-9-1/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/05/spservices-compatibility-issues-with-jquery-1-9-1/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-compatibility-issues-with-jquery-1-9-1</feedburner:origLink></item>
		<item>
		<title>Refreshing a Page Section with a User-selected Interval Set with jQueryUI’s Slider</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/8w4aV77iWYg/</link>
		<comments>http://sympmarc.com/2013/02/04/refreshing-a-page-section-with-a-user-selected-interval-set-with-jqueryuis-slider/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 05:52:01 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[auto-refresh]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[slider]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16252</guid>
		<description><![CDATA[I&#8217;m still doing lots of work with SharePoint 2007, even while many of my compatriots have moved on almost exclusively to 2013 work. The new shiny stuff is fun and all, but just because it&#8217;s new doesn&#8217;t mean that all the good work is there. Both SharePoint 2007 and 2010 are still providing valuable collaborative &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/02/04/refreshing-a-page-section-with-a-user-selected-interval-set-with-jqueryuis-slider/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m still doing lots of work with SharePoint 2007, even while many of my compatriots have moved on almost exclusively to 2013 work. The new shiny stuff is fun and all, but just because it&#8217;s new doesn&#8217;t mean that all the good work is there. Both SharePoint 2007 and 2010 are still providing valuable collaborative toolsets in organizations out there.</p>
<p>When you work with an older version of the product, you get the benefit of hindsight as well as knowledge of new trends in user interfaces and development approaches.</p>
<p>One of my clients wanted to create and auto-refresh capability for a SharePoint 2007 page that they use as a sort of dashboard. Many of the people in the organization keep the page open all day, and hitting refresh all the time is tedious. They also forget sometimes and can mistakenly be looking at stale content.</p>
<p>In SharePoint 2010, Data View Web Parts (DVWPs) provide this capability simply by checking a box on the ribbon (which usually works). I&#8217;ve rarely seen anyone enable the feature in 2010, but it&#8217;s there. To make this work in 2007, I had to build it with script.</p>
<p>To improve the situation, and therefore the general user experience (UX), we decided to give the user control over the auto-refresh capability. It wasn&#8217;t that much extra work to do it this way, and by allowing them the set their own refresh interval, they feel that they have more control of the page. This makes them more satisfied with the solution, which increases adoption. All goodness.</p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/01/2-4-2013-00-23-40.jpg"><img class="aligncenter  wp-image-16316" alt="Page Map" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/01/2-4-2013-00-23-40.jpg?resize=440%2C248" data-recalc-dims="1" /></a></p>
<p>It took some iteration to decide how to lay things out ideally, so what I&#8217;m showing here is closer to the end result than the starting point. I was able to take advantage of a function I had written earlier called refreshElement, which I wrote about in my prior post entitled <a title="Refreshing a Web Part Without a Postback Using jQuery’s AJAX Function" href="http://sympmarc.com/2012/07/11/refreshing-a-web-part-without-a-postback-using-jquerys-ajax-function/" target="_blank">Refreshing a Web Part Without a Postback Using jQuery’s AJAX Function</a>.</p>
<p>The first step is to ensure that we have references to jQuery, jQueryUI, and jQueryUI&#8217;s CSS in the page. I&#8217;m also using jQuery cookie to set a cookie with the value in the slider that the user sets, thus making it possible to persist the value between sessions. In this particular case, we have references to the script libraries in the master page because we&#8217;re using them pervasively.</p>
<p>Next, I added a little markup to the page. My thinking on this was that by adding the markup at the top on the PlaceHolderMain rather than where the slider actually ended up, I could ensure that the data which drives the refresh will always be in the same place that I always put my script references, thus easy to find. If we decide to put the slider somewhere else in the page, I can just change the script, with no need to change the markup in the page itself. (We&#8217;re using this capability in four sites at the moment, with more to come.) There&#8217;s a div containing the slider info and then a second div wrapped around the area of the page I&#8217;d like to refresh. The refresh div can really surround anything in the page. I&#8217;m using AJAX to grab the full page, and I can simply parse out whatever is in the div. In this case, it contains the complex DVWP and one other Web Part. Note that the first div has a data attribute (how very HTML5 of me) which &#8220;points&#8221; to the div we want to actually refresh.</p>
<pre class="brush: xml; title: ; notranslate">&lt;/pre&gt;
&lt;div id=&quot;aaa-refresh-control&quot; data-to-refresh=&quot;aaa-listing&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;aaa-listing&quot;&gt;&lt;!-- ... DVWP, etc. ... --&gt;&lt;/div&gt;
&lt;pre&gt;
</pre>
<p>Next comes the script. Hopefully the comments inline are clear enough, but if you have questions feel free to ask them in the comments section.</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {

  // If there is an element with the id aaa-refresh-control, we'll refresh what it indicates at a user-specified interval
  var refreshControl = $(&quot;#aaa-refresh-control&quot;);
  var toRefresh = refreshControl.data(&quot;to-refresh&quot;);

  // If there is a request to refresh an element...
  if(toRefresh !== undefined) {

    $(&quot;div[id$='QuickLaunchNavigationManager']&quot;).append(refreshControl);

    // Add the elements to the page that we need for the functionality to work
    refreshControl.append(&quot;&lt;div id='refreshInfo'&gt;&quot; +
      &quot;&lt;label for='refreshInterval'&gt;Refresh every&lt;/label&gt;  &quot; +
      &quot;&lt;input type='text' id='refreshInterval'/&gt;minutes &quot; +
      &quot;&lt;label id='refreshTime'&gt;&lt;/label&gt;&lt;/div&gt;&quot;);
    refreshControl.append(&quot;&lt;div id='refreshSlider'&gt;&lt;/div&gt;&quot;);
    refreshControl.append(&quot;&lt;div id='refreshNow'&gt;&lt;/div&gt;&quot;);

    // Get the refresh interval value the user has set by retrieving the cookie
    var refreshInterval = $.cookie(&quot;refreshInterval&quot;);

    // If the refreshInterval hasn't been set, default to 5 minutes
    if(refreshInterval == 0 || refreshInterval == undefined) refreshInterval = 5;
    $(&quot;#refreshInterval&quot;).val(refreshInterval);
    $(&quot;#refreshTime&quot;).html(&quot;Last refreshed: &quot; + getNow());

    // Set up the refresh behavior using a timer
    var refreshListing = setInterval(function(){
      refreshElement(toRefresh, &quot;&quot;, &quot;Please wait...&quot;, &quot;Refreshing...&quot;);
      $(&quot;#refreshTime&quot;).html(&quot;Last refreshed: &quot; + getNow());
    }, 1000 * 60 * refreshInterval);
    $(&quot;#aaa-listing&quot;).css(&quot;clear&quot;, &quot;both&quot;);

    // Adjusting the slider allows the user to set the refresh interval to their own needs
    $(&quot;#refreshSlider&quot;).slider({
      value: refreshInterval,
      min: 5,
      max: 60,
      step: 5,
      slide: function(event, ui) {
        $(&quot;#refreshInterval&quot;).val(ui.value);
      },
      change: function(event, ui) {

        // Set a cookie with the refresh interval so that we can reload it when we return
        $.cookie(&quot;refreshInterval&quot;, ui.value);
        clearInterval(refreshListing);

        // Re-initialize the timer
        refreshListing = setInterval(function(){
          refreshElement(toRefresh, &quot;&quot;, &quot;Please wait...&quot;, &quot;Refreshing...&quot;);
          $(&quot;#refreshTime&quot;).html(&quot;Last refreshed: &quot; + getNow());
        }, 1000 * 60 * ui.value);
        $(&quot;#aaa-listing&quot;).css(&quot;clear&quot;, &quot;both&quot;);
      }
    });
  }

});

// Refreshes an element's contents on a user action, showing a modal dialog during the refresh
// elementId  The id of the container element
// qs      The Query String to append to the current URL
// msg      The message to show in the dialog
function refreshElement(elementId, qs, title, msg) {

  var elementObj = $(&quot;#&quot; + elementId);
  var infoDialog = $(&quot;&lt;div&gt;&lt;div&gt;&quot; + msg + &quot;&lt;/div&gt;&lt;div class='aaa-please-wait'&gt;&lt;/div&gt;&lt;/div&gt;&quot;).dialog({
    open: function(event, ui) {
      $(&quot;.ui-dialog-titlebar-close&quot;).hide();  // Hide the close X
      $(this).css(&quot;overflow-y&quot;, &quot;visible&quot;);  // Fix for the scrollbar in IE
    },
    autoOpen: false,
    title: title,
    modal: true,
    position: { my: &quot;center&quot;, at: &quot;center&quot;, of: window }
  });
  infoDialog.dialog(&quot;open&quot;);

  elementObj.fadeOut(&quot;slow&quot;, function() {
    $.ajax({
      // Need this to be synchronous so we're assured of a valid value
      async: false,
      url: window.location.pathname + qs,
      complete: function (xData) {
        newHtml = $(xData.responseText).find(&quot;#&quot; + elementId).html();
        elementObj.html(newHtml);
      }
    });

  }).fadeIn(&quot;slow&quot;, function() {
    infoDialog.dialog(&quot;close&quot;);
  });
}

// Helper function which gets the current time and formats it in HH:MM format
function getNow() {
  var d = new Date();
  var curr_hour = d.getHours();
  var curr_min = d.getMinutes() &gt;= 10 ? d.getMinutes() : &quot;0&quot; + d.getMinutes();
  return curr_hour + &quot;:&quot; + curr_min;
}</pre>
<p>And voila. We have a little slider right under the main links in the Quick Launch which the user can slide to set their own refresh interval. Every time the timer hits that interval, the dialog pops up with info about the refresh, the content is refreshed, and the time above the slider changes to tell the user how fresh the content is.<br />
<a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-29-2013-13-33-541.jpg"><img class="size-full wp-image-16311 aligncenter" alt="jQueryUI Slider" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-29-2013-13-33-541.jpg?resize=191%2C199" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=8w4aV77iWYg:3-y682eHQ3c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/8w4aV77iWYg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/02/04/refreshing-a-page-section-with-a-user-selected-interval-set-with-jqueryuis-slider/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/02/04/refreshing-a-page-section-with-a-user-selected-interval-set-with-jqueryuis-slider/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=refreshing-a-page-section-with-a-user-selected-interval-set-with-jqueryuis-slider</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #2 – Charting List Data with HighCharts</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/YS8dJmyyz4M/</link>
		<comments>http://sympmarc.com/2013/01/29/spservices-stories-2-charting-list-data-with-highcharts/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 04:54:39 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16210</guid>
		<description><![CDATA[This entry is part 2 of 13 in the series SPServices StoriesIntroduction This submission comes to us from an anonymous reader, who can&#8217;t publish the details under his (or her) name due to confidentiality issues. However, s/he has been able to generate some very useful charts with HighCharts using SharePoint list data as the underlying &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/29/spservices-stories-2-charting-list-data-with-highcharts/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 2 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>This submission comes to us from an anonymous reader, who can&#8217;t publish the details under his (or her) name due to confidentiality issues. However, s/he has been able to generate some very useful charts with <a title="HighCharts" href="http://www.highcharts.com/" target="_blank">HighCharts</a> using SharePoint list data as the underlying data sources.</p>
<h2>Charting List Data with HighCharts</h2>
<p><a href="http://www.highcharts.com/"><img class="alignright size-full wp-image-16266" alt="HighCharts" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-29-2013-23-35-51.jpg?resize=386%2C78" data-recalc-dims="1" /></a>In the following code, the source list contains columns with Year (string), Month (1-12), and Value (number with decimals).</p>
<p>While HighCharts isn&#8217;t free, the licensing costs are quite reasonable. A similar approach would work with other charting engines out there which may be free.</p>
<p>The page has a Content Editor Web Part dropped into it with the Content Link pointing to a file containing the following:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- jquery and spservices are in the masterpage here this is a CEWP noConflict is on--&gt;

&lt;script type=&quot;text/javascript&quot;src=&quot;//code.highcharts.com/highcharts.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;//code.highcharts.com/modules/exporting.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function GetYearSeries(series, year)
{
  var gotOne = false;
  var seriesOptions;

  jQuery.each (series, function(index, dataItem) {
    if (dataItem.name === year)
    {
      seriesOptions = dataItem;
      gotOne=true;
    }
  });

  if (!gotOne)
  {
    seriesOptions = {
      name: year,
      data: [0,0,0,0,0,0,0,0,0,0,0,0]
    };

    series.push (seriesOptions);
  }

  return seriesOptions;

}

jQuery(function($) {

  var CamlQuery = &quot;&lt;Query&gt;&lt;OrderBy&gt;&lt;FieldRef Name='Year' /&gt;&lt;FieldRef Name='Month' Ascending='False' /&gt;&lt;/OrderBy&gt;&lt;/Query&gt;&quot;;

  $().SPServices({
    operation: &quot;GetListItems&quot;,
    async: true,
    listName: &quot;Sales&quot;,
    CAMLQuery: CamlQuery,
    CAMLViewFields: &quot;&lt;ViewFields&gt;&lt;FieldRef Name='Year' /&gt;&lt;FieldRef Name='Month' /&gt;&lt;FieldRef Name='Value' /&gt;&lt;/ViewFields&gt;&quot;,
    completefunc: GraphIt
  });

  function GraphIt(xmlResponse)
  {

    var options = {
      chart: {
        renderTo: 'container',
        type: 'column'
      },
      title: {
        text: 'Sales'
      },
      xAxis: {
        categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
      },
      yAxis: {
        title: {
          text: 'Value'
        }
      },
      series: []
    };

    $(xmlResponse.responseXML).SPFilterNode(&quot;z:row&quot;).each(function() {

      var seriesOptions = GetYearSeries(options.series, $(this).attr('ows_Year'));
      var month=parseInt($(this).attr('ows_Month'))-1;

      seriesOptions.data[month]=parseFloat($(this).attr('ows_Value'));
    });
    var chart = new Highcharts.Chart(options);

  }

});//docReady
&lt;/script&gt;

&lt;div id=&quot;container&quot; style=&quot;min-width: 400px; height: 400px; margin: 0 auto&quot;&gt;&lt;/div&gt;
</pre>
<p>This generates a chart which looks something like this:</p>
<p style="text-align: center;"><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-29-2013-23-40-411.jpg"><img class="size-full wp-image-16270 aligncenter" alt="HighCharts Example" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-29-2013-23-40-411.jpg?resize=440%2C280" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=YS8dJmyyz4M:XHmWsnbTI6Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/YS8dJmyyz4M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/29/spservices-stories-2-charting-list-data-with-highcharts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/01/29/spservices-stories-2-charting-list-data-with-highcharts/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-2-charting-list-data-with-highcharts</feedburner:origLink></item>
		<item>
		<title>SPServices Compatibility Issues with the Minified Version of jQuery 1.9.0</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/-h4Rid7aSME/</link>
		<comments>http://sympmarc.com/2013/01/29/spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0/#comments</comments>
		<pubDate>Wed, 30 Jan 2013 04:17:14 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16257</guid>
		<description><![CDATA[Codeplex users tedka and danstaley have reported issues using SPServices with jQuery 1.9.0. You can read their issues here and here, respectively. I&#8217;ve done some quick testing, and the problem seems to be with the minified version of jQuery 1.9.0, *not* 1.9.0 itself. When I use the non-minified version, my test pages perform just fine. &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/29/spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a title="Download jQuery 1.9.0" href="http://jquery.com/download/" target="_blank"><img class="alignright" style="margin: 0px 0px 0px 10px; border: 0px currentColor; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="Download jQuery 1.9.0" alt="Download jQuery 1.9.0" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/01/image_thumb.png?resize=344%2C75" align="right" border="0" data-recalc-dims="1" /></a>Codeplex users <a href="http://www.codeplex.com/site/users/view/tedka">tedka</a> and <a href="http://www.codeplex.com/site/users/view/danstaley">danstaley</a> have reported issues using <a href="http://spservices.codeplex.com/" target="_blank">SPServices</a> with <a href="http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/" target="_blank">jQuery 1.9.0</a>. You can read their issues <a href="http://spservices.codeplex.com/workitem/10117" target="_blank">here</a> and <a href="http://spservices.codeplex.com/workitem/10118" target="_blank">here</a>, respectively.</p>
<p>I&#8217;ve done some quick testing, and the problem seems to be with the minified version of jQuery 1.9.0, *not* 1.9.0 itself. When I use the non-minified version, my test pages perform just fine.</p>
<p>I&#8217;ve added a note to the home page of SPServices to this effect:</p>
<blockquote><p><strong><span style="color: #ff0000;">2013-01-29 &#8211; At this time, SPServices seems to work just fine with jQuery 1.9.0, but NOT with the minified version. If you need to use jQuery 1.9.0, please stick with the non-minified version or minify your own version.</span></strong></p></blockquote>
<p>When I create my own minified version of 1.9.0 using <a href="http://sympmarc.com/2010/05/21/the-javascript-compressorrater/" target="_blank">The JavaScript CompressorRater</a> (I chose the first YUI Compressor 2.4.2 result, as I do when I minify SPServices), my minified version works fine, too.</p>
<p><del>At this point, I&#8217;m not sure what the exact problem is, but I&#8217;ll try to contact the jQuery team to see if there have been any other reports of issues. I&#8217;m not sure how well that will go, but at least there&#8217;s a workaround.</del></p>
<p>I found some other reports of issues which are caused by this line at the end of the minified version of jQuery 1.9.0:</p>
<p>//@ sourceMappingURL=jquery.min.map</p>
<p>While the source mapping capability sounds useful, having this line in the minified version causes another library following that line to throw errors, which is explained well on <a href="http://stackoverflow.com/questions/14402741/jquery-1-9-0-and-modernizr-cannot-be-minified-with-the-asp-net-web-optimization" target="_blank">this thread</a> at StackOverflow.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>This is a known issue with jQuery 1.9.0, which the team has already fixed for the next version. Here&#8217;s the bug in the jQuery bug tracker: <a href="http://bugs.jquery.com/ticket/13274">http://bugs.jquery.com/ticket/13274</a></div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=-h4Rid7aSME:VG3BJ5SKAI0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/-h4Rid7aSME" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/29/spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/01/29/spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-compatibility-issues-with-the-minified-version-of-jquery-1-9-0</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #3 – AddWebPart Method of the WebPartPages Web Service</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/L41YRbe2guw/</link>
		<comments>http://sympmarc.com/2013/01/21/sharepoint-stories-3-addwebpart-method-of-the-webpartpages-web-service/#comments</comments>
		<pubDate>Mon, 21 Jan 2013 19:43:58 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16236</guid>
		<description><![CDATA[This entry is part 3 of 13 in the series SPServices StoriesIntroduction Eric Alexander (@ejaya2) should be no stranger to those of you who have visited NothingButSharePoint&#8216;s Stump the Panel forums. If you&#8217;ve ever visited those forums, odds are very good that Eric has helped you out. He&#8217;s a stalwart member of the SharePoint support &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/21/sharepoint-stories-3-addwebpart-method-of-the-webpartpages-web-service/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 3 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Eric Alexander (<a title="@ejaya2" href="http://twitter.com/ejaya2" target="_blank">@ejaya2</a>) should be no stranger to those of you who have visited <a href="https://www.nothingbutsharepoint.com/" target="_blank">NothingButSharePoint</a>&#8216;s <a title="Stump the Panel" href="https://www.nothingbutsharepoint.com/sites/eusp/Forum/" target="_blank">Stump the Panel</a> forums. If you&#8217;ve ever visited those forums, odds are very good that Eric has helped you out. He&#8217;s a stalwart member of the SharePoint support community.</p>
<p>Eric wrote a <a title="AddWebPart Method of the WebPartPages Web Service" href="http://pirateeric.sharepointspace.com/blog/Lists/Posts/Post.aspx?ID=16" target="_blank">post</a> on his <a title="Eric Alexander's Sharepoint Blog" href="http://pirateeric.sharepointspace.com/blog/" target="_blank">blog</a> about using <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> to add Web Parts to existing pages that I thought was worth sharing as an SPServices Story.</p>
<h2>AddWebPart Method of the WebPartPages Web Service</h2>
<p>There are a lot of documentation black holes out there in the Sharepoint land and it seems that the WebPartPages web service is one of them.</p>
<p>In a project I&#8217;m currently working on, there is a need to automate a project creation process that is very manual to something more automated. Fortunately we have Nintex Workflow to handle situations like this.​ Part of this workflow is to provision a new subsite after the project is approved by the project manager. Nintex makes this easy with their LazyApproval feature and create site action.</p>
<p>What I needed to do was upon site creation from a template, add some web parts to the home page. This is where I was running into the huge documentation gap. I turned to one of my goto libraries, SPServices, to protoype the actual calls before porting it over to my workflow. Fortunately someone had tried to do this same thing in the past and provided a working example for adding a content editor web part. That is described here and worked no problem. My issue is I need to add list view web parts of document libraries and lists. I tried many things over the span of a couple days to tweak that to get my web parts onto the page. No dice.</p>
<p>Today I stumbled upon a post by Glyn Clough that filled that documentation black hole.</p>
<p>I need to use the List View Web Part markup like this for lists:</p>
<pre class="brush: xml; highlight: [10]; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;webParts&gt;
 &lt;webPart xmlns=&quot;http://schemas.microsoft.com/WebPart/v3&quot;&gt;
  &lt;metaData&gt;
   &lt;type name=&quot;Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; /&gt;
   &lt;importErrorMessage&gt;Cannot import this Web Part.&lt;/importErrorMessage&gt;
  &lt;/metaData&gt;
  &lt;data&gt;
   &lt;properties&gt;
    &lt;property name=&quot;ListUrl&quot; type=&quot;string&quot;&gt;Lists/CustomList&lt;/property&gt;
    &lt;property name=&quot;ExportMode&quot; type=&quot;exportmode&quot;&gt;All&lt;/property&gt;
   &lt;/properties&gt;
  &lt;/data&gt;
 &lt;/webPart&gt;
&lt;/webParts&gt;
</pre>
<p>and like this for document libraries:</p>
<pre class="brush: xml; highlight: [10]; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
&lt;webParts&gt;
 &lt;webPart xmlns=&quot;http://schemas.microsoft.com/WebPart/v3&quot;&gt;
  &lt;metaData&gt;
   &lt;type name=&quot;Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot; /&gt;
   &lt;importErrorMessage&gt;Cannot import this Web Part.&lt;/importErrorMessage&gt;
  &lt;/metaData&gt;
  &lt;data&gt;
   &lt;properties&gt;
    &lt;property name=&quot;ListUrl&quot; type=&quot;string&quot;&gt;Library&lt;/property&gt;
    &lt;property name=&quot;ExportMode&quot; type=&quot;exportmode&quot;&gt;All&lt;/property&gt;
   &lt;/properties&gt;
  &lt;/data&gt;
 &lt;/webPart&gt;
&lt;/webParts&gt;
</pre>
<p>Once escaped and passed into my SPServices function I had web parts on my web part page.</p>
<h2>SPServices Code</h2>
<p>Eric&#8217;s post doesn&#8217;t have the SPServices call in his <a title="AddWebPart Method of the WebPartPages Web Service" href="http://pirateeric.sharepointspace.com/blog/Lists/Posts/Post.aspx?ID=16" target="_blank">post</a>, so I thought I&#8217;d provide an example here. This is built from the example from the documentation on the SPServices Codeplex site for <a title="AddWebPart" href="http://spservices.codeplex.com/wikipage?title=AddWebPart" target="_blank">AddWebPart</a>. It adds an XLV Web Part showing the default view of my Tasks list to the home page of my root site and shows me an alert with the results.</p>
<pre class="brush: jscript; title: ; notranslate">
var str = &quot;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&quot; +
&quot;&amp;lt;webParts&amp;gt;&quot; +
 &quot;&amp;lt;webPart xmlns=&amp;quot;http://schemas.microsoft.com/WebPart/v3&amp;quot;&amp;gt;&quot; +
  &quot;&amp;lt;metaData&amp;gt;&quot; +
   &quot;&amp;lt;type name=&amp;quot;Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; /&amp;gt;&quot; +
   &quot;&amp;lt;importErrorMessage&amp;gt;Cannot import this Web Part.&amp;lt;/importErrorMessage&amp;gt;&quot; +
  &quot;&amp;lt;/metaData&amp;gt;&quot; +
  &quot;&amp;lt;data&amp;gt;&quot; +
   &quot;&amp;lt;properties&amp;gt;&quot; +
    &quot;&amp;lt;property name=&amp;quot;ListUrl&amp;quot; type=&amp;quot;string&amp;quot;&amp;gt;Lists/Tasks&amp;lt;/property&amp;gt;&quot; +
    &quot;&amp;lt;property name=&amp;quot;ExportMode&amp;quot; type=&amp;quot;exportmode&amp;quot;&amp;gt;All&amp;lt;/property&amp;gt;&quot; +
   &quot;&amp;lt;/properties&amp;gt;&quot; +
  &quot;&amp;lt;/data&amp;gt;&quot; +
 &quot;&amp;lt;/webPart&amp;gt;&quot; +
&quot;&amp;lt;/webParts&amp;gt;&quot;;

$().SPServices({
  operation: &quot;AddWebPart&quot;,
  webPartXml: str,
  pageUrl: &quot;/SitePages/Home.aspx&quot;,
  storage: &quot;Shared&quot;,
  async: true,
  completefunc: function (xData, Status) {
    alert(&quot;Status: &quot; + Status + &quot; xData: &quot; + xData.responseText);
  }
});
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=L41YRbe2guw:59NOxCptRQA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/L41YRbe2guw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/21/sharepoint-stories-3-addwebpart-method-of-the-webpartpages-web-service/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/01/21/sharepoint-stories-3-addwebpart-method-of-the-webpartpages-web-service/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=sharepoint-stories-3-addwebpart-method-of-the-webpartpages-web-service</feedburner:origLink></item>
		<item>
		<title>SPServices Stories #1 – How to Start a Workflow on Multiple Items in a List</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/jVjJ5z6Wt3Q/</link>
		<comments>http://sympmarc.com/2013/01/21/spservices-stories-1-how-to-start-a-workflow-on-multiple-items-in-a-list/#comments</comments>
		<pubDate>Mon, 21 Jan 2013 12:57:42 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>
		<category><![CDATA[SPServices Stories]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16203</guid>
		<description><![CDATA[This entry is part 1 of 13 in the series SPServices StoriesIntroduction Given the fact that so many people are using SPServices these days, I wanted to start posting some of the great things that people are doing with it out there. If you have a story about how you are using SPServices that you &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/21/spservices-stories-1-how-to-start-a-workflow-on-multiple-items-in-a-list/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<div class="seriesmeta">This entry is part 1 of 13 in the series <a href="http://sympmarc.com/series/spservices-stories/" class="series-61133114" title="SPServices Stories">SPServices Stories</a></div><h2>Introduction</h2>
<p>Given the fact that so many people are using <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a> these days, I wanted to start posting some of the great things that people are doing with it out there.</p>
<p>If you have a story about how you are using SPServices that you would like to tell, ping me using the contact form. Your story doesn&#8217;t even have to include code, though people love to see examples. I&#8217;m always interested in what impact using SPServices may have had on your development philosophy, time to market with solutions, hiring practices, really anything that you feel SPServices has enabled you to do.</p>
<p>We can remove any identifying details if you feel that need to do so, but I&#8217;d like these stories to show off what *you* have done, so it&#8217;s great if you can take credit. I reserve the right to do a little editing for clarity, but otherwise you can write your own story. I&#8217;m also happy to help.</p>
<p>The first guest post is from fellow SharePoint MVP, <a title="Alberto Diaz Martin MVP Profile" href="https://mvp.support.microsoft.com/profile=6F139395-5EF0-437E-9546-DB715152AFEB" target="_blank">Alberto Diaz Martin</a>, who lives in Spain. Thanks to Alberto for kicking this series off!</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>You can also read this post in Spanish on Alberto&#8217;s blog <a title="SharePoint 2010. Iniciar un flujo de trabajo en múltiples elementos de una lista" href="http://geeks.ms/blogs/adiazmartin/archive/2013/01/27/sharepoint-2010-iniciar-un-flujo-de-trabajo-en-m-250-ltiples-elementos-de-una-lista.aspx" target="_blank">SharePoint 2010. Iniciar un flujo de trabajo en múltiples elementos de una lista</a></div>
<h2>How to Start a Workflow on Multiple Items on a List</h2>
<p>In SharePoint 2010 we have the option to select multiple items on a list. When you select several items, the ribbon allows you to Delete Items and Send Alerts, but where is the Workflow command?</p>
<p>To start a workflow on a list item, you have to go through the Start workflow page and if the workflow has an initialization form, you also have to enter the parameters. Because of this, SharePoint doesn&#8217;t allow users to start a workflow on multiple items simultaneously. But why not do so when we have a parameter-less workflow?</p>
<p>I think this is a missing feature on SharePoint 2010 because we can certainly do it using the SharePoint API or Web Services without any problems. What can we do to provide this capability to our users?</p>
<p>First, we need to create a Ribbon command using a Custom Action and in this action we will have two options to try to start the workflow. The first one uses an application page by passing the selected items as parameters and uses the server API to start the process. The second, and more flexible and elegant option is using JavaScript and the SharePoint Web Services to start each workflow per item.</p>
<p><img class="aligncenter size-full wp-image-16219" alt="SPServices Workflow Ribbon Custom Action" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/01/spservices-workflow-1.png?resize=440%2C171" data-recalc-dims="1" /></p>
<p>SharePoint Web Services are a horrible way to talk with SharePoint [ed: I disagree, but everyone is entitled to their opinion!] because the Web Services use XML to get and put parameters and options, and it’s not easy working with XML in JavaScript.</p>
<h2>SPServices to the Rescue!!</h2>
<p>As you know, SPServices is a jQuery library which encapsulates SharePoint Web Services with jQuery to make it easy to call them. SPServices has a Workflow namespace with some powerful operations and we can use StartWorkflow to start an item workflow, even if it has parameters.</p>
<p>It is so easy to use, you only need the Item URL, the workflow template Id and, if required, the workflow parameters.</p>
<pre class="brush: jscript; title: ; notranslate">
$().SPServices({
  operation: &quot;StartWorkflow&quot;,
  item: currentItemURL,
  templateId: workflowGUID,
  workflowParameters: workflowParams,
  async: true,
  completefunc: function () {
    SP.UI.Notify.addNotification(&quot;Workflow process started on selected item.&quot;, false);
  }
});
</pre>
<p>To get the workflow template Id, we have another function called GetTemplatesForItem that returns all the associated workflows for an item. All we have to do is get all the templates and find our workflow by name.</p>
<pre class="brush: jscript; title: ; notranslate">
$().SPServices({
  operation: &quot;GetTemplatesForItem&quot;,
  item: itemURL,
  async: true,
  completefunc: function (xData, Status) {
    var currentItemURL = this.item;
    $(xData.responseXML).find(&quot;WorkflowTemplates &gt; WorkflowTemplate&quot;).each(function (i, e) {
      if ($(this).attr(&quot;Name&quot;) == &quot;Invoice Approve&quot;) {
        var guid = $(this).find(&quot;WorkflowTemplateIdSet&quot;).attr(&quot;TemplateId&quot;);
        if (guid != null) {
          workflowGUID = &quot;{&quot; + guid + &quot;}&quot;;
          //in this point, we have our workflow Id and we have to call the starting method
        }
      }
    }
  }
})
</pre>
<p>Now, we have to traverse the selected items in the custom action method, and for each item call the SPServices StartWorkflow method. Something like this:</p>
<pre class="brush: jscript; title: ; notranslate">
function StarSignWorkflow(listId) {

  RemoveAllStatus(true);
  waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Starting approval workflow process on selected item','Please,wait until we finished this long operation.',76,400);

  //Get the selected items
  clientContext = new SP.ClientContext.get_current();
  var web = clientContext.get_web();
  var list = web.get_lists().getById(listId);
  var items = SP.ListOperation.Selection.getSelectedItems(ctx);
  totaSelItems = items.length;

  //Because only have items Id,we need to use Client Object Model to get EncodeAbsUrl.
  var query = new SP.CamlQuery();
  var queryString = '&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;In&gt;&lt;FieldRef Name=&quot;ID&quot;/&gt;&lt;Values&gt;';
  for (index in items) {
    var valueString = '&lt;Value Type=&quot;Integer&quot;&gt;' + items[index].id + '&lt;/Value&gt;';
    queryString = queryString + valueString;
  }

  query.set_viewXml(queryString + '&lt;/Values&gt;&lt;/In&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;');
  this.collListItems = list.getItems(query);
  clientContext.load(collListItems,'Include(EncodedAbsUrl)');

  //In the success callback,we’ll have all the selected items with the absolute url.
  clientContext.executeQueryAsync(Function.createDelegate(this,this.onInitProcessSuccess),Function.createDelegate(this,this.onInitProcessFail));
}

function onInitProcessSuccess() {

  var listItemEnumerator = this.collListItems.getEnumerator();

  //If our workflow has default init param,we can provide it in this way to run workflow with default values.
  var workflowParams = &quot;&lt;Data&gt;&lt;Approvers&gt;&lt;/Approvers&gt;&lt;NotificationMessage&gt;&lt;/NotificationMessage&gt;&quot; +
      &quot;&lt;DurationforSerialTasks&gt;&lt;/DurationforSerialTasks&gt;&lt;DurationUnits&gt;&lt;/DurationUnits&gt;&quot; +
      &quot;&lt;CC&gt;&lt;/CC&gt;&lt;CancelonRejection&gt;&lt;/CancelonRejection&gt;&lt;CancelonChange&gt;&lt;/CancelonChange&gt;&quot; +
   &quot;&lt;EnableContentApproval&gt;&lt;/EnableContentApproval&gt;&lt;/Data&gt;&quot;;

  try {
    var counter = 1;
    var total = totaSelItems;

    //Traverse all the selected items
    while (listItemEnumerator.moveNext()) {
      var oListItem = listItemEnumerator.get_current();
      var itemURL = oListItem.get_item('EncodedAbsUrl');
      var workflowGUID = null;

      //Before start the workflow,we used GetTemplatesForItem to get Workflow Template Id.
      $().SPServices({
        operation: &quot;GetTemplatesForItem&quot;,
        item: itemURL,
        async: true,
        completefunc: function (xData,Status) {
          var currentItemURL = this.item;
          $(xData.responseXML).find(&quot;WorkflowTemplates &gt; WorkflowTemplate&quot;).each(function (i,e) {
            if ($(this).attr(&quot;Name&quot;) == &quot;Invoice Approve&quot;) {
              var guid = $(this).find(&quot;WorkflowTemplateIdSet&quot;).attr(&quot;TemplateId&quot;);
              if (guid != null) {
                workflowGUID = &quot;{&quot; + guid + &quot;}&quot;;
                $().SPServices({
                  operation: &quot;StartWorkflow&quot;,
                  item: currentItemURL,
                  templateId: workflowGUID,
                  workflowParameters: workflowParams,
                  async: true,
                  completefunc: function () {
                    if (total == counter) {
                      if (waitDialog != null) {
                        waitDialog.close();
                      }
                      SP.UI.Notify.addNotification(&quot;Started workflow approved process for selected invoice.&quot;,false);
                      window.location.reload();
                    }
                    counter++;
                  }
                });
              }
            }
          });
        }
      });
    }
  }catch (e) {
    if (waitDialog != null) {
      waitDialog.close();
    }
    AddStatus(&quot;There is an exception. Error: &quot; + e.message,&quot;red&quot;);
  }
}</pre>
<p>As you can see, you have an easy way to provide an easy way to start a process on multiple items at the same time. Thanks to SPServices, working with SharePoint client side is more flexible and easy.</p>
<p style="text-align: left;"><img class="size-full wp-image-16211 alignleft" alt="AlbertoDiazMartin" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/01/AlbertoDiazMartin.jpg?resize=78%2C100" data-recalc-dims="1" />Alberto Diaz Martin<br />
MVP SharePoint<br />
<a title="adiazcan@hotmail.com" href="mailto:adiazcan@hotmail.com">adiazcan@hotmail.com</a><br />
<a title="@adiazcan" href="http://twitter.com/adiazcan" target="_blank">@adiazcan</a><br />
<a href="http://geeks.ms/blogs/adiazmartin">http://geeks.ms/blogs/adiazmartin</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=jVjJ5z6Wt3Q:NjBhyTBXplE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/jVjJ5z6Wt3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/21/spservices-stories-1-how-to-start-a-workflow-on-multiple-items-in-a-list/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<series:name><![CDATA[SPServices Stories]]></series:name>
	<feedburner:origLink>http://sympmarc.com/2013/01/21/spservices-stories-1-how-to-start-a-workflow-on-multiple-items-in-a-list/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spservices-stories-1-how-to-start-a-workflow-on-multiple-items-in-a-list</feedburner:origLink></item>
		<item>
		<title>Is Client Side Scripting a Good Way to Access SharePoint Data?</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/NqUPWrJHzCQ/</link>
		<comments>http://sympmarc.com/2013/01/16/is-client-side-scripting-a-good-way-to-access-sharepoint-data/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 18:43:10 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Data View Web Part]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16199</guid>
		<description><![CDATA[People reach out to me all the time to ask my advice on how to accomplish certain things with SharePoint. Sometimes I can help, and sometimes their questions are way beyond me. One of the benefits of being reasonably well known in the SharePoint space is that people tend to come to me with questions &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/16/is-client-side-scripting-a-good-way-to-access-sharepoint-data/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>People reach out to me all the time to ask my advice on how to accomplish certain things with SharePoint. Sometimes I can help, and sometimes their questions are way beyond me. One of the benefits of being reasonably well known in the SharePoint space is that people tend to come to me with questions that are up my alley.</p>
<p>When the questions aren&#8217;t something I can handle, I usually suggest that they use one of the public forums out there. My favorite is <a href="http://sharepoint.stackexchange.com/" target="_blank">SharePoint StackExchange</a> and in a distant second, the <a href="http://social.technet.microsoft.com/Forums/en-US/category/sharepoint" target="_blank">MSDN Forums for SharePoint</a>.</p>
<p>Other times, either due to how they found me or based on the content of their questions, things stay in an email exchange.</p>
<p>The other day, my friend and colleague Christina Wheeler (<a href="http://twitter.com/cwheeler76" target="_blank">@cwheeler76</a>) passed along some questions from someone she knew [I've edited each part of the exchange a little for clarity and anonymity]:</p>
<blockquote><p>I was wondering if you have a good resource within your network that might have published a blog about the different ways to access Sharepoint list data (client side scripting using something like SPServices or server side scripting using a deployable web part). Also, are there any other ways to accomplish this? I know the data view web part is another method, but it has its limitations.</p>
<p>A good example would be wanting to combine data from a SharePoint list and an external list and display both back to the browser window. I thought SPServices would be an excellent alternative to the data view web part, because it wouldn’t require taking the server down to deploy or redeploy. However, there are concerns coming from my team that client side is not as fast, secure etc. So I am just looking to see if there are any resources out there that have addressed this as it relates directly to Sharepoint.</p></blockquote>
<p>Well, she certainly arrived in the right place with those questions. Since SPServices is mine, I can certainly answer any questions about it better than most people. The first thing I did was refer her to the post that Mark Rackley (<a href="http://twitter.com/MrAckley" target="_blank">@MrAckley</a>) and I wrote together called <a href="http://sympmarc.com/2012/04/12/when-to-choose-spservices-vs-the-client-side-object-model-csom/" target="_blank">When to Choose SPServices vs. the Client Side Object Model (CSOM)</a>. That post has gotten a lot of reads and Mark and I still think it covers the topic pretty well.</p>
<p>That prompted the next set of questions:</p>
<blockquote><p>Thank you so very much for pointing me to all this valuable information! [...] mentioned the SPServices [...], and from then, I was hooked. Honestly, it was the number one thing I took away [...] because of its potential to get around some Sharepoint limitations. To give you an example, we have a [...] calendar that is managed under the IT site for the Sharepoint intranet. We like to display a summary of the daily or upcoming downtime to appear on the home page. The only way to display this data from another sub site (before) was with an RSS feed. The problem with the RSS feed is when we get into reoccurring events on the Sharepoint calendar. Now, I abandoned the RSS feed in favor of SPServices and it works beautifully.</p>
<p>My problem comes in with trying to get everyone on board that client scripting is okay to use for returning SharePoint list data. This argument is a perfect example. I am familiar with both client side scripting (javascript, xslt, jquery) and server side scripting with C#, but I don’t claim to be an expert. The argument that has been presented to me is that server side scripting is preferred because:</p>
<p>1.) It&#8217;s more secure</p>
<p>2.) It’s browser independent</p>
<p>3.) It’s better from a performance perspective</p>
<p>I tend to disagree that server side scripting is <b>always</b> the better answer for Sharepoint solutions. For one, we are not talking about writing an ERP payroll system where I plan to return thousands and thousands of records, so the amount of data I plan to return from a SharePoint list is minimal enough that I don’t think performance is a concern. For browser independence, that’s why I use jquery. And I don’t really know the answer about security. I think it comes down to what I want to do with the javascript. I am talking about using js to return a Sharepoint list. In this scenario, there is no increased threat of any kind by choosing to use client side javascript over a custom deployable web part written in C#. The case I am trying to argue is that using client side scripting to access a Sharepoint list is now possible, and in some cases, more desirable because it is easier to test, deploy, update and would not require any server downtime. I would just like to know your thoughts on this, or perhaps any resources…another blog or white paper you wrote that touches on best practices for when to use client side scripting vs server side development? Please bear with me because I have only been using Sharepoint for 6 months. Are there any other options to displaying Sharepoint list data other than using client side scripting like SPServices or CSOM, or to write an ASP.net page or deploy a custom web part that uses the Sharepoint Object model reference? I’m sure this is such an obvious answer that I have never really understood the answer to!</p>
<p>We plan to debate this issue tomorrow and I am just trying to make sure I understand the concerns/risks about coding for Sharepoint, specifically. There are lots of resources that touch on when to use client side scripting vs server side coding, but I think it’s not so black and white when it comes to working with Sharepoint.</p></blockquote>
<p>And my reply was this:</p>
<blockquote><p>You’re spot on in your thinking. This is a classic “it depends” scenario, of course. A good architect looks at all of the possible tools to solve the problem and decides where and when to use each one. Client side scripting is an excellent option for some things and just downright a bad idea for others.</p>
<p>The security argument is moot. The Web Services fully respect the permission model. If the user can’t access something through the UI, they can’t through the Web Services, either. QED. In a way, it’s even *<b>more</b>* secure than server side code since it’s impossible to elevate permissions, which many developers do as a common practice whether it’s needed or not.</p>
<p>Here are some more posts which may be helpful [each here on my blog]:</p>
<p><a href="http://sympmarc.com/2011/05/27/elevating-permissions-with-sharepoints-web-services/">http://sympmarc.com/2011/05/27/elevating-permissions-with-sharepoints-web-services/</a></p>
<p><a href="http://sympmarc.com/2011/06/06/using-script-to-hide-content-not-always-a-good-idea/">http://sympmarc.com/2011/06/06/using-script-to-hide-content-not-always-a-good-idea/</a></p>
<p><a href="http://sympmarc.com/2011/05/18/sharepoint-myths-part-2/">http://sympmarc.com/2011/05/18/sharepoint-myths-part-2/</a></p>
<p>Finally, the best argument that you can make is that Microsoft is going to a distributed, client side development model in SharePoint 2013, relying on (you guessed it) JavaScript and jQuery much of the time. If they are baking it into the product set by expanding their version of the API (versus mine with SPServices) how can someone argue that client side development is flat out a bad idea?</p></blockquote>
<p>I don&#8217;t know if this little exchange will be useful for anyone else or not. However, it seems like every time I answer questions like there, it helps me to crystalize my thinking a little more. If it&#8217;s helpful to others, great. Otherwise, at least I had a little fun writing it up.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=NqUPWrJHzCQ:exnXrnY_KV0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/NqUPWrJHzCQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/16/is-client-side-scripting-a-good-way-to-access-sharepoint-data/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/01/16/is-client-side-scripting-a-good-way-to-access-sharepoint-data/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=is-client-side-scripting-a-good-way-to-access-sharepoint-data</feedburner:origLink></item>
		<item>
		<title>Calculate Days between Two SharePoint List Dates in XSL Using ddwrt:DateTimeTick</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/EXzLA9xTucs/</link>
		<comments>http://sympmarc.com/2013/01/07/calculate-days-between-two-sharepoint-list-dates-in-xsl/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 15:11:52 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[ddwrt: namespace]]></category>
		<category><![CDATA[ddwrt:DateTimeTick]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[MSDN Forums]]></category>
		<category><![CDATA[XLV Web Part]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16174</guid>
		<description><![CDATA[There was an interesting question over in the MSDN Forums the other day that I struggled to answer. It was a headscratcher, so I had to figure it out. In the thread, emfuentes27 wanted to know why s/he saw different results in SharePoint Designer than in the browser when using this formula: Not only had &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/07/calculate-days-between-two-sharepoint-list-dates-in-xsl/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>There was an interesting question over in the MSDN Forums the other day that I struggled to answer. It was a headscratcher, so I had to figure it out. In the <a href="Calculate the days between today and specific day.">thread</a>, <a href="http://social.msdn.microsoft.com/profile/emfuentes27/?ws=usercard-mini" target="_blank">emfuentes27</a> wanted to know why s/he saw different results in SharePoint Designer than in the browser when using this formula:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;xsl:value-of select=&quot;number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Due_Date))))- number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string($Today))))&quot; /&gt;
</pre>
<p>Not only had I never seen the ddwrt:DateTimeTick function (no documentation on that is available anywhere at all that I can find), but the numbers just didn&#8217;t make sense.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>The ddwrt namespace functions are incredibly valuable, but they are simply not documented by Microsoft anywhere. There is a <a title="ddwrt documentation" href="http://msdn.microsoft.com/en-us/library/dd583143(v=office.11).aspx" target="_blank">single article</a> by Serge van den Oever (<a title="@svdoever" href="https://twitter.com/svdoever" target="_blank">@svdoever</a>) from the SharePoint 2003 days which explains it (very well), but that&#8217;s really it.</div>
<p>The ddwrt:DateTimeTick isn&#8217;t documented there and I&#8217;d never seen it in the wild. At least now I know about it.</p>
<p>To determine the days between two dates in the past, I&#8217;ve always used date arithmetic XSL templates, as I explain in my post <a title="Date Arithmetic in SharePoint DVWPs" href="http://sympmarc.com/2009/07/22/date-arithmetic-in-sharepoint-dvwps/">Date Arithmetic in SharePoint DVWPs</a>. The ddwrt:DateTimeTick function turns out to be a lot easier to use, but as I said, the numbers just didn&#8217;t make sense. They didn&#8217;t make sense, that is, until I went back to a little arithmetic.</p>
<p>It seems that the values in the browser were off from the ones in SPD (I tested this in WSS 3.0 because I had that VM open) by a factor of 864000000000. Trying to figure out the significance of that, I realized that it&#8217;s the number of seconds in a day times 1 million:</p>
<p>864000000000 = 60 * 60 * 24 * 1000000</p>
<p>60 * 60 * 24 = the number of seconds in a day.</p>
<p><a title="Wolfram Alpha" href="http://www.wolframalpha.com" target="_blank">Wolfram Alpha</a> helps with this. Try going there and typing in <a title="86400 seconds" href="http://www.wolframalpha.com/input/?i=86400+seconds" target="_blank">86400 seconds</a>.</p>
<p>Who knows why this is the case, but this equation will give you the right answer in a browser (it will be wrong in SPD), which is what you are really after in the first place:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;xsl:value-of select=&quot;(number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Lead_x0020_Date)))) - number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(string(@Created))))) div 864000000000&quot; /&gt;
</pre>
<p>The ddwrt:DateTimeTick function is a great tool for your XSL work in SharePoint. It returns the number of &#8220;ticks&#8221; since Dec 30, 1899 in SharePoint Designer. That&#8217;s an odd date to use as the base, but you can test it by adding this to your XSL:</p>
<pre class="brush: xml; title: ; notranslate">
1899-12-30::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-01')))&quot; /&gt;&lt;br/&gt;
1899-12-31::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-02')))&quot; /&gt;&lt;br/&gt;
1900-01-01::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-03')))&quot; /&gt;&lt;br/&gt;
</pre>
<p>Even odder, the base date in the browser seems to be Jan 1, 0001. You don&#8217;t see that date bandied about too often. Go ahead; give it a go:</p>
<pre class="brush: xml; title: ; notranslate">
0001-01-01::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-01'))) div 864000000000&quot; /&gt;&lt;br/&gt;
0001-01-02::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-02'))) div 864000000000&quot; /&gt;&lt;br/&gt;
0001-01-03::&lt;xsl:value-of select=&quot;ddwrt:DateTimeTick(ddwrt:GenDisplayName(string('0001-01-03'))) div 864000000000&quot; /&gt;&lt;br/&gt;
</pre>
<p>This is yet another example where the rendering engine in SharePoint Designer doesn&#8217;t yield the same results as what the SharePoint server provides. Don&#8217;t expect something like this to be fixed any time soon, though, given Microsoft&#8217;s <a title="SharePoint Designer 2013′s Missing Design View" href="http://sympmarc.com/2012/08/02/sharepoint-designer-2013s-missing-design-view/">abandonment of the Design and Split View in SharePoint Designer 2013</a>.</p>
<p>We don&#8217;t really care what the base date is for zero ticks, of course; we just want to be able to use the values to determine the difference in days between two &#8220;ticks&#8221;. As long as you use the million-day-seconds trick, all is well.</p>
<div style="margin-top:10px;border:3px #000000 solid;border-radius:10px;width:655px;height:80px;">
<div style="float:left;width:375px;position:relative;margin:10px;">This post also appeared on <a target="_blank" href="http://NothingButSharePoint.com">NothingButSharePoint.com</a>&#8216;s <a href="http://www.nothingbutsharepoint.com/sites/eusp" target="_blank">EndUserSharePoint channel</a> on 2013-01-09.  <a target="_blank" href="https://www.nothingbutsharepoint.com/sites/eusp/Pages/Calculate-Days-between-Two-SharePoint-List-Dates-in-XSL-Using-ddwrtDateTimeTick.aspx">Visit the post</a> there to read additional comments.</div>
<div style="float:right;width:260px;"><a href="http://www.nothingbutsharepoint.com/sites/eusp" target="_blank"><img src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2009/12/122209_0306_ajquerylibr1.png?w=440" data-recalc-dims="1"></a></div>
</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=EXzLA9xTucs:Dy_0ruchr0c:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/EXzLA9xTucs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/07/calculate-days-between-two-sharepoint-list-dates-in-xsl/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/01/07/calculate-days-between-two-sharepoint-list-dates-in-xsl/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=calculate-days-between-two-sharepoint-list-dates-in-xsl</feedburner:origLink></item>
		<item>
		<title>Upgrading Your jQueryUI Custom Theme</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/Qv-guHqqYhQ/</link>
		<comments>http://sympmarc.com/2013/01/03/upgrading-your-jqueryui-custom-theme/#comments</comments>
		<pubDate>Thu, 03 Jan 2013 19:41:32 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jQuery UI]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[ThemeRoller]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16154</guid>
		<description><![CDATA[I have always wondered what would happen if I created a custom theme for jQueryUI using the excellent ThemeRoller tool and then wanted to upgrade my version of jQueryUI. It always seemed like the odds were that the existing CSS and accompanying image files wouldn&#8217;t change too much (I&#8217;ve found that there&#8217;s far less disruption &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2013/01/03/upgrading-your-jqueryui-custom-theme/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://jqueryui.com/themeroller/"><img class="size-full wp-image-16162 alignright" alt="jQuery ThemeRoller" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-3-2013-14-33-01.jpg?resize=233%2C493" data-recalc-dims="1" /></a>I have always wondered what would happen if I created a custom theme for <a title="jQueryUI" href="http://jqueryui.com" target="_blank">jQueryUI</a> using the excellent <a title="jQueryUI Themeroller" href="http://jqueryui.com/themeroller/" target="_blank">ThemeRoller tool</a> and then wanted to upgrade my version of jQueryUI. It always seemed like the odds were that the existing CSS and accompanying image files wouldn&#8217;t change too much (I&#8217;ve found that there&#8217;s far less disruption in an upgrade to jQueryUI than there is in an upgrade to jQuery itself), but at a certain point, there were bound to be changes that mattered enough to cause a problem.</p>
<p>I haven&#8217;t run into any of those problems, but as I&#8217;m carefully upgrading jQueryUI in a client installation, I don&#8217;t want to make any egregious mistakes. (The buck stops with me no matter how crappy a tool I&#8217;m using works.)</p>
<p>I decided to Bingle to see if there was a converter that some kind soul may have built out there somewhere. Lo and behold, it&#8217;s even easier than that. I found a nice little <a href="http://stackoverflow.com/questions/3802447/how-to-upgrade-a-custom-jquery-ui-theme" target="_blank">answer over on StackExchange that shows how</a>. Thanks to StackExchange user <a title="fbuchinger" href="http://stackoverflow.com/users/113936/fbuchinger" target="_blank">fbuchinger</a> for that. Gotta love the Internet.</p>
<p>If you open your custom CSS file and scroll down to the second main section, you&#8217;ll see something like this:</p>
<pre class="brush: css; highlight: [10]; title: ; notranslate">
/*!
 * jQuery UI CSS Framework 1.8.20
 *
 * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 * http://jquery.org/license
 *
 * http://docs.jquery.com/UI/Theming/API
 *
 * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana,Arial,sans-serif&amp;fwDefault=normal&amp;fsDefault=1.1em[...SNIP...]cornerRadiusShadow=5px
 */
</pre>
<p>Assuming that you haven&#8217;t customized your theme manually since downloading it (probably a big assumption, actually) this link in the CSS file allows you to go right back to where you started in the ThemeRoller. Simply copy that link and paste it into a browser window and the ThemeRoller will load up your custom theme just as you created it.</p>
<p>My guess is that this would be a bit more tenuous depending on how many versions removed you are from the current one, but I&#8217;ve had no problems today. This is also helpful if you create a theme and realize a few days later that you missed that baby blue hover color that only shows up with one of the widgets or something.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>I just realized that the &#8220;To view and modify this theme&#8221; link may show up in different places in the CSS file depending upon your version. Do a search &#8211; it should be there somewhere.</div>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=Qv-guHqqYhQ:hC6IjfmXXgA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/Qv-guHqqYhQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/03/upgrading-your-jqueryui-custom-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/01/03/upgrading-your-jqueryui-custom-theme/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=upgrading-your-jqueryui-custom-theme</feedburner:origLink></item>
		<item>
		<title>Honored to Be Named a 2013 Microsoft SharePoint MVP</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/QbLcIYDr_F8/</link>
		<comments>http://sympmarc.com/2013/01/01/honored-to-be-named-a-2013-microsoft-sharepoint-mvp/#comments</comments>
		<pubDate>Tue, 01 Jan 2013 15:17:26 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16148</guid>
		<description><![CDATA[This is the best New Year&#8217;s message to get. It&#8217;s still an honor and a thrill on the third go around. I&#8217;m more humbled each year I receive the award to be a member of a club which has such intelligent and interesting members. Thanks, Microsoft, for this true honor.]]></description>
				<content:encoded><![CDATA[<p>This is the best New Year&#8217;s message to get. It&#8217;s still an honor and a thrill on the third go around. I&#8217;m more humbled each year I receive the award to be a member of a club which has such intelligent and interesting members. Thanks, Microsoft, for this true honor.<br />
<img class="aligncenter size-full wp-image-16149" alt="2013 SharePoint MVP Notification" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2013/01/1-1-2013-09-10-04.jpg?resize=440%2C177" data-recalc-dims="1" /></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=QbLcIYDr_F8:AZUTJkBXae8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/QbLcIYDr_F8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2013/01/01/honored-to-be-named-a-2013-microsoft-sharepoint-mvp/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2013/01/01/honored-to-be-named-a-2013-microsoft-sharepoint-mvp/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=honored-to-be-named-a-2013-microsoft-sharepoint-mvp</feedburner:origLink></item>
		<item>
		<title>Getting the Value of a Managed Metadata Column with jQuery</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/nZP7XK2GpD4/</link>
		<comments>http://sympmarc.com/2012/12/16/getting-the-value-of-a-managed-metadata-column-with-jquery/#comments</comments>
		<pubDate>Mon, 17 Dec 2012 04:03:44 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Managed Metadata]]></category>
		<category><![CDATA[Managed Metadata Picker]]></category>
		<category><![CDATA[MMS]]></category>
		<category><![CDATA[Taxonomy Picker]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16120</guid>
		<description><![CDATA[There was a post from Roger Langedal over on SPYam the other day asking about getting the value of a Managed Metadata column using jQuery. I hadn&#8217;t tried this before, so I thought I should give it a go. As when I first figured out how to get the value of a People Picker, which &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2012/12/16/getting-the-value-of-a-managed-metadata-column-with-jquery/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>There was a post from <a title="Roger Langedal" href="https://www.yammer.com/spyam/users/roger1-guest" target="_blank" data-resource-id="1488286492">Roger Langedal</a> over on SPYam the other day asking about getting the value of a Managed Metadata column using jQuery.<br />
<img class="aligncenter size-full wp-image-16135" alt="12-16-2012 22-24-12" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/12/12-16-2012-22-24-121.jpg?resize=432%2C112" data-recalc-dims="1" /></p>
<p>I hadn&#8217;t tried this before, so I thought I should give it a go.</p>
<div class="important_block message-block"><p class="printonly"><strong>Important!</strong></p>By the way, if you are a SharePoint person (you&#8217;ve arrived here, so I think we can assume it&#8217;s pretty likely you are) and you aren&#8217;t a member of SPYam, which is the <a title="Yammer" href="https://www.yammer.com/" target="_blank">Yammer</a>-based SharePoint community created by Joel Oleson (<a title="@joeloleson" href="http://twitter.com/joeloleson" target="_blank">@joeloleson</a>), then you should be. If you&#8217;d like an invitation, ping me and I&#8217;ll send you one. UPDATE 2013-01-04: Actually, anyone can request membership themselves at this point. Just go to <a href="https://www.yammer.com/SPYam">SPYam</a> and sign up.</div>
<p>As when I <a title="Working with SharePoint People Pickers with jQuery: A New Function Called findPeoplePicker" href="http://sympmarc.com/2012/04/22/working-with-sharepoint-people-pickers-with-jquery-a-new-function-called-findpeoplepicker/">first figured out how to get the value of a People Picker</a>, which later evolved into the <a title="SPFindPeoplePicker" href="http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices.SPFindPeoplePicker" target="_blank">SPFindPeoplePicker</a> function in <a title="SPServices" href="http://spservices.codeplex.com" target="_blank">SPServices</a>, consider this a rough first pass. I&#8217;m sure I&#8217;m not covering many edge cases because I haven&#8217;t experimented enough yet.</p>
<p>The basics are pretty simple. The Managed Metadata Picker (or perhaps it should be called a Taxonomy Picker, given the CSS classes that Microsoft uses within it) is embedded within the form much like the People Picker is. Luckily there is a pretty easy way to identify it in the page. When you dig into the markup in the DOM, there&#8217;s a div which has the column name as its Title attribute.</p>
<p>In my experiment, I&#8217;ve got a column called Office, and here&#8217;s what that div looks like:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;ms-taxonomy-fieldeditor ms-taxonomy-writing&quot; title=&quot;Office&quot; style=&quot;width: 362px;&quot;&gt;
</pre>
<p>There&#8217;s another div within that one, and within the second div, you&#8217;ll see several spans.</p>
<p>If there are spans with the div which have the CSS class valid-text, then they contain the valid value(s) you&#8217;ve selected for the picker. For example, Newton Centre below.<br />
<img class="aligncenter size-full wp-image-16129" alt="12-16-2012 22-31-14" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/12/12-16-2012-22-31-142.jpg?resize=440%2C23" data-recalc-dims="1" /></p>
<p>If there are spans within the div with the CSS class invalid-text, they contains the entered value(s) which aren&#8217;t legitimate values for that column. For instance, if I type in Hanover for my Office (which isn&#8217;t one of the allowed values), it&#8217;ll be in one of these spans.<br />
<img class="aligncenter size-full wp-image-16128" alt="12-16-2012 22-31-14" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2012/12/12-16-2012-22-31-141.jpg?resize=440%2C23" data-recalc-dims="1" /></p>
<p>So getting at the acceptable values is fairly simple with jQuery. Again, this is a first pass, but it should be serviceable.</p>
<pre class="brush: jscript; title: ; notranslate">
// Find the div for the column which contains the entered data values
var thisDiv = $(&quot;div[title='Office']&quot;);
// Fill an array with the acceptable values
var acceptableValues = [];
thisDiv.find(&quot;span.valid-text&quot;).each(function() {
  var thisValue = $(this);
  acceptableValues.push(thisValue.text());
});
</pre>
<p>At this point, you&#8217;ll have an array which contains all of the text values which are acceptable, meaning that they are legitimate values from the Term Set.</p>
<p>If you&#8217;d like to get at the unacceptable values, it&#8217;s basically the same idea:</p>
<pre class="brush: jscript; title: ; notranslate">
// Find the div for the column which contains the entered data values
var thisDiv = $(&quot;div[title='Office']&quot;);
// Fill an array with the unacceptable values
var unacceptableValues = [];
thisDiv.find(&quot;span.invalid-text&quot;).each(function() {
  var thisValue = $(this);
  unacceptableValues.push(thisValue.text());
});
</pre>
<p>From here, you could do whatever you&#8217;d like with the values. They are in an array, so if you&#8217;d like to save them to another column, you&#8217;ll probable want to join them into a single string. The code below will join the values together into one nice, displayable string, with the values separated by commas. If there&#8217;s just a single value, that the string will be that single value.</p>
<pre class="brush: jscript; title: ; notranslate">
var accepted = acceptableValues.join(&quot;, &quot;);
var unaccepted = unacceptableValues.join(&quot;, &quot;);
</pre>
<p>Let me know if this works for you, and if not, what issues you might have. Hope it helps.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=nZP7XK2GpD4:K7Jrl9JdHsE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/nZP7XK2GpD4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2012/12/16/getting-the-value-of-a-managed-metadata-column-with-jquery/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2012/12/16/getting-the-value-of-a-managed-metadata-column-with-jquery/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-the-value-of-a-managed-metadata-column-with-jquery</feedburner:origLink></item>
		<item>
		<title>People Want Different Things</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/MRYu0tw5xVo/</link>
		<comments>http://sympmarc.com/2012/12/01/people-want-different-things/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 14:49:30 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[SharePoint stories]]></category>
		<category><![CDATA[User Experience]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16095</guid>
		<description><![CDATA[Dan Antion (@dantion) did a great post over on his SharePoint Stories blog this morning called People Want Different Things. Dan does one excellent post per week on that blog. They arrive every Saturday morning, and reading it is usually one of the first things I do of a Saturday. Today&#8217;s was a great post, &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2012/12/01/people-want-different-things/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Dan Antion (<a href="http://twitter/DAntion">@dantion</a>) did a great post over on his <a href="http://www.sharepointstories.com">SharePoint Stories</a> blog this morning called <a href="http://www.sharepointstories.com/2012/12/people-want-different-things.html">People Want Different Things</a>. Dan does one excellent post per week on that blog. They arrive every Saturday morning, and reading it is usually one of the first things I do of a Saturday.</p>
<p>Today&#8217;s was a great post, as always, and prompted me to write a comment, much of which turned into this post. Dan&#8217;s post hits on something I feel very strongly about: there is no one-size-fits-all concept with SharePoint.</p>
<p>There are many, many people out on SharePointLand who seem to think that there is one way to do any one thing in SharePoint. Usually it&#8217;s the way that they know best, and is sometimes the way that they are selling (though sales people in SharePointLand seem to be far more ethical than in the other lands I have visited).</p>
<p>This mindset can apply across many dimensions: development, branding, information architecture, process implementation, you name it. There&#8217;s a reason people joke about what I and many other SharePointilists usually say, but the right answer is almost always &#8220;It depends.&#8221;</p>
<p>In Dan&#8217;s post, he gives the three main ways he approaches most of his SharePoint work (I won&#8217;t repeat them here, read <a href="http://www.sharepointstories.com/2012/12/people-want-different-things.html">Dan&#8217;s post</a>), and I happen to know that there are favors and variations on the three (the jazz masters have nothing on us SharePointilists) and there are probably a fourth and fifth or more some days, too.</p>
<p>And that&#8217;s Dan&#8217;s point, I believe. Using SharePoint has some science to it, but to a large degree it&#8217;s more art than science. Anyone who marches into a new client, project, or meeting thinking they positively have the answer up front is more than likely wrong. SharePoint is a collaboration platform first and foremost &#8211; which can make it frustrating to use in other ways &#8211; and building stuff in SharePoint ought to be a collaborative process. I call that collaborative development, and whether you label it with other buzzwords like Agile or not, I firmly believe it&#8217;s the best approach.</p>
<p>So it&#8217;s not just that People Want Different Things; it goes beyond what any one person likes. It&#8217;s what the right answer turns out to be. Sometimes you don&#8217;t truly know that answer until you have finished. Of course, work on SharePoint-based solutions should never really be finished, but that&#8217;s another another post for a different day.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=MRYu0tw5xVo:gRCU27GRKwE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/MRYu0tw5xVo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2012/12/01/people-want-different-things/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2012/12/01/people-want-different-things/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=people-want-different-things</feedburner:origLink></item>
		<item>
		<title>Easily Hide Columns on a SharePoint Form with jQuery</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/asX13GcwOZE/</link>
		<comments>http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 04:54:11 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Forms]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16089</guid>
		<description><![CDATA[This is a really simple little thing. I end up writing little functions like this all the time, and never think much about them. But they are darn useful. This little function will hide a list column&#8217;s row in the form. You might want to do this on a NewForm but not the EditForm, for &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>This is a really simple little thing. I end up writing little functions like this all the time, and never think much about them. But they are darn useful.</p>
<p>This little function will hide a list column&#8217;s row in the form. You might want to do this on a NewForm but not the EditForm, for instance, so setting the column to be hidden may not be a good answer. With this little function, you can hide the column&#8217;s row conditionally or on page load &#8211; whatever suits your fancy.</p>
<p>Here&#8217;s the function. All you need to pass it is the DisplayName of the column.</p>
<pre class="brush: jscript; title: ; notranslate">
// Function to hide a column's row in the form
function hideColumn(c) {
  $(&quot;.ms-formlabel h3 nobr&quot;).filter(function() {
    var thisText = $.trim($(this).clone().children().remove().end().text());
 //   alert(&quot;::&quot; + thisText + &quot;::&quot;);
    return thisText.indexOf(c) === 0 &amp;&amp; thisText.length === c.length;
  }).closest(&quot;tr&quot;).hide();
}
</pre>
<p>Then you might call the function like this:</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {
  hideColumn(&quot;Priority&quot;);
});
</pre>
<p>This will simply hide the column, but any value in it will still be submitted.</p>
<p>For instance, I just added a column to a list called &#8220;User Agent String&#8221;, set like so:</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;textarea[title='User Agent String']&quot;).val(navigator.userAgent);
</pre>
<p>and then hid it:</p>
<pre class="brush: jscript; title: ; notranslate">
hideColumn(&quot;User Agent String&quot;);
</pre>
<p>Put it together and what have you got? (Bonus points to anyone who knows the next line in the song.)</p>
<pre class="brush: jscript; title: ; notranslate">
$(document).ready(function() {

  // Set the User Agent String
  $(&quot;textarea[title='User Agent String']&quot;).val(navigator.userAgent);

  // Hide the columns which aren't relevant to the user
  hideColumn(&quot;User Agent String&quot;);

});

// Function to hide a column's row in the form
function hideColumn(c) {
  $(&quot;.ms-formlabel h3 nobr&quot;).filter(function() {
    var thisText = $.trim($(this).clone().children().remove().end().text());
 //   alert(&quot;::&quot; + thisText + &quot;::&quot;);
    return thisText.indexOf(c) === 0 &amp;&amp; thisText.length === c.length;
  }).closest(&quot;tr&quot;).hide();
}
</pre>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=asX13GcwOZE:J-vTYsTaz64:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/asX13GcwOZE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2012/11/29/easily-hide-columns-on-a-sharepoint-form-with-jquery/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=easily-hide-columns-on-a-sharepoint-form-with-jquery</feedburner:origLink></item>
		<item>
		<title>MySPC 2012</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/tUi6sygVLZc/</link>
		<comments>http://sympmarc.com/2012/11/16/myspc-2012/#comments</comments>
		<pubDate>Fri, 16 Nov 2012 15:10:54 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Microsoft SharePoint Conference]]></category>
		<category><![CDATA[SPC12]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16043</guid>
		<description><![CDATA[Well, Microsoft&#8217;s SharePoint Conference 2012 has come to a close, and I&#8217;m writing this post on the plane flying back to Boston. It was a humdinger of a conference. Not only was this the largest SharePoint conference on record, having it in Las Vegas made everything seem just that much bigger and flashy. Whether it &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2012/11/16/myspc-2012/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>Well, <a href="http://www.mssharepointconference.com" target="_blank">Microsoft&#8217;s SharePoint Conference 2012</a> has come to a close, and I&#8217;m writing this post on the plane flying back to Boston. It was a humdinger of a conference. Not only was this the largest SharePoint conference on record, having it in Las Vegas made everything seem just that much bigger and flashy.</p>
<p style="text-align: left;"><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-12-09.45.38.jpg"><img class="aligncenter" style="padding-top: 0px; padding-right: 0px; padding-left: 0px; margin-top: 10px; margin-bottom: 10px; display: block; background-image: none; border: 0px none;" title="2012-11-12 09.45.38" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-12-09.45.38_thumb.jpg?resize=440%2C330" alt="2012-11-12 09.45.38" border="0" data-recalc-dims="1" /></a>Whether it was strolling the Exhibit Hall or the halls of the convention center or sitting in one of the over 250 sessions, all the buzz was about SharePoint 2013, which was released to manufacturing (RTM – a Microsoft term for&#8221;shipped&#8221; ). While only one of my clients has indicated any real interest in 2013 at this point (I do a mix of SharePoint 2007 and 2010 work these days), it was hard not to be swept up in the fever around this new release. <a href="http://sharepoint.microsoft.com/en-in/preview/SitePages/sharepoint.aspx" target="_blank">SharePoint 2013</a> is a huge undertaking in its own right, but Microsoft has also RTMed <a href="http://www.microsoft.com/office/preview/en" target="_blank">Office 2013</a> and <a href="http://windows.microsoft.com/en-US/windows/home" target="_blank">Windows 8</a> in concert, and there was a lot of information at SPC about the great integration across those toolsets.</p>
<h2>SharePoint 2013 Unveiled: Live from Las Vegas</h2>
<p>Thursday I had the honor of participating in a webinar for SusQTech&#8217;s &#8217;30 on Thursday&#8217; series called <a href="http://www.susqtech.com/Webinars/Pages/SharePoint-2013-Unveiled-Live-from-Las-Vegas.aspx" target="_blank">SharePoint 2013 Unveiled: Live from Las Vegas</a>. Liam Cleary and I talked about the key takeaways we had from attending SPC this week. Since our perspectives are different and we do different types of work, of course we keyed in on different aspects of 2013. In the webinar, I talked about my three main takeaways from SPC. You can listen to the free webinar recording when it&#8217;s available if you are interested.</p>
<h3><a href="http://www.susqtech.com/Webinars/Pages/webinars.aspx"><img class="aligncenter size-medium wp-image-16062" title="30onthursdays" src="http://i0.wp.com/sympmarc.com/wp-content/uploads/2012/11/30onthursdays.jpg?resize=300%2C55" alt="" data-recalc-dims="1" /></a>The Democratization of SharePoint Development</h3>
<p>With the new <a href="http://msdn.microsoft.com/en-us/office/apps/fp160950.aspx" target="_blank">App Model</a> and the ability to host apps off-SharePoint, the market opens up to developers of many stripes, as long as those stripes blend into the colors of the Web development savannah. I&#8217;ve been promoting this for quite a few years now, and I&#8217;m truly glad to see it happen under Microsoft&#8217;s auspices. Now we have &#8220;official&#8221; ways to use JavaScript, jQuery, etc. to create SharePoint apps, and in fact, many SharePoint apps will be all JavaScript apps. I&#8217;m not saying that the .NET model hasn&#8217;t been a successful way to build upon SharePoint, I&#8217;m saying that now we have the options that I think we need to push the envelope even further on usability and distributed processing where it makes good sense.</p>
<h3>New Search Features</h3>
<p>The most exciting new Search feature is, for me, hands down the <a href="http://msdn.microsoft.com/en-us/library/jj163789.aspx" target="_blank">Content Search Web Part</a>. This little beauty will be a game changer. What it allows you to do is surface content from anywhere in the farm using custom display templates. That means that it truly no longer matters where content lives, as long as it is correctly constructed and  tagged so that search can identify it. Think of the CQWP as the Content Query Web Part with nuclear power. The underlying search engine in 2013 is greatly improved to start with and the CSWP makes it sing. Think of this example: a CSWP in a page in a Community of Practice or Center of Excellence site could surface collaborative content a from across the Site Collection which meets certain keyword or content inclusion criteria, with ratings and usage metrics used as further filters. All this can happen with the expected, appropriate security trimming for each individual user or permissions groups. The UI for the CSWP is simple enough to allow a Site Administrator to set it up, with added capabilities for writing more complex queries in the advanced mode.</p>
<h3>Access 2013 Apps</h3>
<p>While I can see that there are some parts of <a href="http://www.microsoft.com/office/preview/en/access-2013-preview" target="_blank">Access 2013</a> story which haven&#8217;t quite been written yet, this approach to developing SharePoint applications shows great promise, as Ruven Gotz (<a title="@ruveng" href="http://twitter.com/ruveng" target="_blank">@ruveng</a>) and I have discussed in person and had been <a href="http://spinsiders.com/ruveng/2012/11/10/access-ability-waiting-for-insight-at-spc12/" target="_blank">hoping on his blog</a>. Access has always been an underrated development environment in my opinion, seen as underpowered and rejected in favor of more complicated server-based tools over the last half dozen years or so. With this release&#8217;s ability to store its content in SQL Server in Azure, the corporate IT concern that the data isn&#8217;t controllable and secure is mitigated. The tool itself has taken on a wonderfully minimalistic likeness of the Windows 8 UI (aka Metro) which is clean yet extremely capable for building real applications.</p>
<p><a href="http://i0.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-17.09.55.jpg"><img style="background-image: none; margin: 10px auto 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border: 0px;" title="2012-11-14 17.09.55" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-17.09.55_thumb.jpg?resize=440%2C330" alt="2012-11-14 17.09.55" border="0" data-recalc-dims="1" /></a>The integration with SharePoint isn&#8217;t fully there yet, and SharePoint list data can only be used in read-only mode in the release. However, I can see a path forward where Access 2013 becomes a viable replacement for InfoPath, and given that InfoPath received no development love this go-around it may well be what Microsoft is thinking as well. Forms development becomes easier, at least to me, and with the underlying data constructs and event triggers we have an environment ready to take off. When we hear &#8220;in this release&#8221; from Microsoft, we&#8217;re used to thinking three years or so, but my gut tells me that paradigm is about to be broken in a significant way, so stay tuned on this one.</p>
<h2>But Wait, There&#8217;s More&#8230;</h2>
<p>Other things worthy of note are the new Design Manager capabilities for building out your branding and the improved workflow capabilities of SharePoint Designer. SharePoint Designer itself has become a bit of an orphan, as it loses the Design and Split views in 2013. While the Design Manager capabilities can fill some of that gap (but only with the Server license when Publishing is enabled) we have a gap there which isn&#8217;t filled by anything other than perhaps Access 2010.</p>
<h3>Improved Social in 2013 + Yammer</h3>
<p>Social in 2013 is leaps and bounds beyond what 2010 gives us. We can follow people, documents, sites, and tags. We can monitor our own newsfeeds and access that content via rich client side APIs. But the real ace in the hole here is going to be <a href="https://www.yammer.com/" target="_blank">Yammer</a>. While I&#8217;m impressed with Yammer as it stands, the best is unknown and yet to come, I think. I&#8217;m impressed with the SharePoint integration points that Yammer has already built in the few months since the purchase by Microsoft. But I think the real secret sauce they bring to the table is their deep knowledge of rapid feature development and deployment in a true SaaS approach. Microsoft can leverage that knowledge and significantly learn from it. If they don&#8217;t, and instead wipe the secret sauce away, then it is at their peril. While there are a lot of positive things to say about Microsoft&#8217;s products, they simply cannot continue in the three year &#8220;enterprise&#8221; cycle they have followed for the last few decades. Yammer&#8217;s mindset (and to a lesser degree, <a href="http://www.skype.com" target="_blank">Skype</a>&#8216;s) can push Microsoft out of this rut into being a nimble and potent &#8220;player&#8221; in social or any other part of the stack. By pushing out regular new features and existing feature refreshes, Microsoft can start to act more like its competition has been acting for a long time now. We see the vision in the vast array of current releases that follow the same patterns in design and development; having them continue to evolve rapidly and in concert would be a stellar improvement.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/IMG_40081.jpg"><img class="aligncenter size-medium wp-image-16061" title="IMG_4008[1]" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/IMG_40081.jpg?resize=300%2C225" alt="" data-recalc-dims="1" /></a>There was plenty more information for IT Pros and Business people as well, of course, but I focused almost exclusively on the Development track. Since the session videos will be available online, I&#8217;ll probably try to catch on some of the better ones based on the tweets I saw throughout the conference later.</p>
<h2>All Work and No Play&#8230;</h2>
<p>Oh, and the parties. Vegas isn&#8217;t known for low key events, and neither do people at a conference there act that way. Everything was bigger, louder, flashier, and more exciting than last year&#8217;s SPC in Anaheim. Here were the events I was lucky enough to attend.</p>
<ul>
<li>Opening Reception on Sunday night</li>
<li>Lounge SPC at the House of Blues Monday night <img style="margin: 10px auto 0px; display: block; float: none;" src="http://i2.wp.com/www.mssharepointconference.com/img/v2/activities/LoungeSPC_ad.jpg?resize=273%2C276" alt="" data-recalc-dims="1" /></li>
<li>MVP/MCP/Insider party at <a title="Border Grill" href="http://www.bordergrill.com/bg_lv/bg_lvwel.htm" target="_blank">Border Grill</a> Monday Night</li>
<li><a href="http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2012/11/14/spc-2012-jon-bon-jovi-amp-the-kings-of-suburbia-play-a-pool-party-for-sharepoint.aspx" target="_blank">Jon Bon Jovi and the Kings of Suburbia</a> at the Mandalay Beach Tuesday night <img style="margin: 10px auto 0px; display: block; float: none;" src="http://i2.wp.com/www.mssharepointconference.com/img/v2/activities/AttendeeEvent_ad.jpg?resize=273%2C282" alt="" data-recalc-dims="1" /></li>
</ul>
<ul>
<li>US MVP breakfast on Wednesday morning</li>
<li>Dinner Wednesday night at <a href="http://www.joel-robuchon.net/#/en/restaurants/10/" target="_blank">L&#8217;Atelier de Joël Robuchon</a> with Michal Pisarek <a href="http://twitter.com/michalpisarek" target="_blank">(@michalpisarek</a>), Denise Ching (<a href="http://twitter.com/deniseching">@deniseching</a>), and Cindy Hui (<a href="http://twitter.com/CindyHui2">@CindyHui2</a>). OK, so this wasn&#8217;t really a party, but it was the best meal of the week for me. Food photos <a href="http://www.facebook.com/marc.d.anderson#!/marc.d.anderson/posts/3910605320487" target="_blank">here</a>.</li>
<li><a href="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-17.57.11.jpg"><img class="aligncenter size-medium wp-image-16053" title="2012-11-14 17.57.11" src="http://i1.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-17.57.11.jpg?resize=300%2C225" alt="" data-recalc-dims="1" /></a>The SharePoint City party at Tryst on Wednesday night, sponsored by <a href="http://axceler.com/">Axeler</a>, <a href="http://jornata.com">Jornata</a>, and many more. For some reason, they had Pamela Anderson show up. Go figure. <img style="margin: 10px auto 0px; display: block; float: none;" src="https://origin.ih.constantcontact.com/fs003/1105670419425/img/49.png" alt="vegas logo" width="310" height="220" border="0" /><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-22.37.45.jpg"><img style="background-image: none; margin: 10px auto 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="2012-11-14 22.37.45" src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/2012-11-14-22.37.45_thumb.jpg?resize=184%2C244" alt="2012-11-14 22.37.45" border="0" data-recalc-dims="1" /></a></li>
</ul>
<h2>Wrap Up</h2>
<p>All in all, this SPC was the biggest Microsoft event I&#8217;ve ever attended, with more information and more glitz than ever. Thanks to everyone on the event planning and logistics staff for all of the yeoman&#8217;s work. No, everything wasn&#8217;t perfect. The lack of wireless capabilities during almost the entire conference certainly detracted from getting information and messaging out that Microsoft should have wanted people not in attendance to hear. There were many sessions that were far to popular for the size of the room the were held in. Predicting this sort of thing is hard, but MySPC should have given a better handle on things. There were too many sessions at any given time to even try to learn about much out side one&#8217;s own &#8220;track&#8221;, though the videos will help with that after the fact. We easily spot these shortcomings and can&#8217;t see many of the things that simply went right. The staff at the Mandalay Bay complex were so helpful and knowledgeable most of the time that it was almost creepy, they really seem to enjoy their work and making things go well for us attendees.</p>
<p>So, a big thank you to everyone who had any part of the panning and execution. I hope to see you in ??? next year!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=tUi6sygVLZc:Xzweyl8ZWcQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/tUi6sygVLZc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2012/11/16/myspc-2012/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2012/11/16/myspc-2012/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=myspc-2012</feedburner:origLink></item>
		<item>
		<title>Where Should SPServices Go Next? Common Question at SPC12</title>
		<link>http://feedproxy.google.com/~r/MarcDAndersonsBlog/~3/M5YXx-_oZRw/</link>
		<comments>http://sympmarc.com/2012/11/13/where-should-spservices-go-next-common-question-at-spc12/#comments</comments>
		<pubDate>Tue, 13 Nov 2012 05:14:11 +0000</pubDate>
		<dc:creator>Marc</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[jQuery library for SharePoint Web Services]]></category>
		<category><![CDATA[SPServices]]></category>

		<guid isPermaLink="false">http://sympmarc.com/?p=16035</guid>
		<description><![CDATA[This is just a quick post I&#8217;d like to use to gather your thoughts on where SPServices should go from here. At The Microsoft SharePoint Conference in Las Vegas, going on right now, many people I&#8217;m talking to are asking me about my plans. I&#8217;ve been mulling it over for a few months now, and &#8230; </p><p><a class="more-link block-button" href="http://sympmarc.com/2012/11/13/where-should-spservices-go-next-common-question-at-spc12/">Continue reading &#187;</a>]]></description>
				<content:encoded><![CDATA[<p>This is just a quick post I&#8217;d like to use to gather your thoughts on where <a href="http://SPServices.codeplex.com">SPServices</a> should go from here.</p>
<p>At The Microsoft SharePoint Conference in Las Vegas, going on right now, many people I&#8217;m talking to are asking me about my plans. I&#8217;ve been mulling it over for a few months now, and I have my own ideas. But I&#8217;d love to hear where you&#8217;d like to see SPServices fit into the SharePoint 2013 landscape. Let me know what you think in the comments, or over on Facebook <a href="http://www.facebook.com/marc.d.anderson/posts/3903091772653?comment_id=3956415&#038;ref=notif&#038;notif_t=feed_comment">here</a> or <a href="http://www.facebook.com/jQSPWS?ref=ts&#038;fref=ts">here</a>.</p>
<p>Here&#8217;s a photo of Jeff Teper speaking at the keynote today. I had a great view from the front row, center.</p>
<p><a href="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/20121112-211403.jpg"><img src="http://i2.wp.com/sympmarc.com/wp-content/uploads/2012/11/20121112-211403.jpg?w=440" alt="20121112-211403.jpg" class="alignnone size-full" data-recalc-dims="1" /></a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?a=M5YXx-_oZRw:-4IZPHgpXTQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/MarcDAndersonsBlog?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/MarcDAndersonsBlog/~4/M5YXx-_oZRw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://sympmarc.com/2012/11/13/where-should-spservices-go-next-common-question-at-spc12/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://sympmarc.com/2012/11/13/where-should-spservices-go-next-common-question-at-spc12/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=where-should-spservices-go-next-common-question-at-spc12</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic page generated in 2.977 seconds. --><!-- Cached page generated by WP-Super-Cache on 2013-05-22 07:36:16 --><!-- Compression = gzip -->
