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

<channel>
	<title>Dev All Day</title>
	<atom:link href="http://www.devallday.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devallday.com</link>
	<description>Sharepoint and .net solutions</description>
	<lastBuildDate>Tue, 01 Jun 2010 12:23:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a dataview report based on calculated dates on a linked data source in Sharepoint Designer</title>
		<link>http://www.devallday.com/2010/06/01/dataview-report-based-on-calculated-dates-linked-data-source/</link>
		<comments>http://www.devallday.com/2010/06/01/dataview-report-based-on-calculated-dates-linked-data-source/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 12:17:11 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Data View]]></category>
		<category><![CDATA[DVWP]]></category>
		<category><![CDATA[Sharepoint Designer]]></category>
		<category><![CDATA[XSL]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=97</guid>
		<description><![CDATA[Scenario &#8211; you want to get a report based on a calculated date that spans multiple document libraries or lists on a Sharepoint site. Sharepoint Dataview doesn&#8217;t give you an out of box solution when using a linked datasource. This article explains how to create reports that span multiple libraries / lists in a site  <a href="http://www.devallday.com/2010/06/01/dataview-report-based-on-calculated-dates-linked-data-source/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Scenario &#8211; you want to get a report based on a calculated date that spans multiple document libraries or lists on a Sharepoint site. Sharepoint Dataview doesn&#8217;t give you an out of box solution when using a linked datasource. This article explains how to create reports that span multiple libraries / lists in a site such as &#8216;all items modified in the last 14 days&#8217;, &#8216;all articles with an expiry date in the next 6 months&#8217; etc.<span id="more-97"></span></p>
<p>1) The first step is to download a set of XSL date funcionality that has been compiled by Andy Lewis on the Sharepoint Designer team blog. Download the date_templates.xsl file from the blog at the foot of <a title="date_templates.xsl" href="http://go2.wordpress.com/?id=725X1342&amp;site=mdasblog.wordpress.com&amp;url=http%3A%2F%2Fblogs.msdn.com%2Fsh  arepointdesigner%2Farchive%2F2008%2F02%2F25%2Ffiltering-and-formatting-with-date-values.aspx&amp;sref=http  %3A%2F%2Fmdasblog.wordpress.com%2F2009%2F07%2F22%2Fdate-arithmetic-in-sharepoint-dvwps%2F" target="_blank">this article</a>:</p>
<p>2) Save the date_templates.xsl file to the sites /Style Library/XSL Style Sheets/ folder. Then add the following directly underneath the dataviews &lt;xsl:stylesheet  opening tag:</p>
<p>&lt;xsl:import href=&#8221;/Style Library/XSL Style Sheets/date_templates.xsl&#8221;/&gt;</p>
<p>Note if you import the spreadsheet then Sharepoint Designer may have issues displaying the DataView correctly but when you browse to the page it should render fine. An alternative is to copy the templates from the file and paste it where your &lt;xsl:import statement would go. However if you do it this way you will have to copy the templates to all the pages that you require this functionality on.</p>
<p>3) Create a variable to hold the calculated date you want to filter on:</p>
<p>&lt;xsl:variable name=&#8221;LastMonth&#8221;&gt;<br />
&lt;xsl:call-template name=&#8221;getDateFromDays&#8221;&gt;<br />
&lt;xsl:with-param name=&#8221;paramBaseDate&#8221; select=&#8221;ddwrt:TodayIso()&#8221;/&gt;<br />
&lt;xsl:with-param name=&#8221;paramDelta&#8221;&gt;-30&lt;/xsl:with-param&gt;<br />
&lt;/xsl:call-template&gt;<br />
&lt;/xsl:variable&gt;</p>
<p>4) use the common tasks pane to open the Filters view and add a basic filter, e.g. Modified &gt; [CurrentDate]</p>
<p><img class="alignnone size-full wp-image-101" title="Common Dataview Tasks - Filter" src="http://www.devallday.com/wp-content/uploads/2010/06/CommonDataviewTasks-Filter.gif" alt="Common Dataview Tasks - Filter" width="247" height="272" /></p>
<p>5) Click the &#8216;Advanced&#8217; button and paste in the following (substitute in your own column and variable names:</p>
<p>[ddwrt:FormatDateTime(string(@Modified) ,1033 ,'yyyyMMdd') &amp;gt;= ddwrt:FormatDateTime(string($LastMonth) ,1033 ,'yyyyMMdd')]</p>
<p><img title="Data View Filter  Advanced condition button" src="http://www.devallday.com/wp-content/uploads/2010/06/DataViewFilter-Advanced.gif" alt="Data View Filter Advanced condition button" width="430" height="258" /></p>
<p><img class="alignnone size-full wp-image-100" title="DataView Filter Advanced Condition" src="http://www.devallday.com/wp-content/uploads/2010/06/AdvancedCondition.gif" alt="DataView Filter Advanced Condition" width="658" height="164" /></p>
<p>6) If you format the dates in the dataview to remove the time then you may need to alter the LCID value to get the regional date format your require, e.g. UK date format is LCID: 2057:</p>
<p>&lt;td&gt;<br />
&lt;xsl:value-of select=&#8221;ddwrt:FormatDate(string(@Modified) ,2057 ,1)&#8221;/&gt;<br />
&lt;/td&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/06/01/dataview-report-based-on-calculated-dates-linked-data-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a related filtered list to a Sharepoint list&#8217;s Display Form (dispform.aspx)</title>
		<link>http://www.devallday.com/2010/05/07/adding-a-related-filtered-list-to-a-sharepoint-lists-display-form-dispform-aspx/</link>
		<comments>http://www.devallday.com/2010/05/07/adding-a-related-filtered-list-to-a-sharepoint-lists-display-form-dispform-aspx/#comments</comments>
		<pubDate>Fri, 07 May 2010 13:28:29 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Sharepoint Designer]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=94</guid>
		<description><![CDATA[Whilst customising one of the Microsoft Sharepoint application templates we needed to work out how to add a view of a list that was related to the item that was being shown in dispform.aspx.
To achieve this:
Add a DataViewWebPart (DVWP) in Sharepoint Designer
Set the DataSource of the DVWP to the related list you want to filter
Add  <a href="http://www.devallday.com/2010/05/07/adding-a-related-filtered-list-to-a-sharepoint-lists-display-form-dispform-aspx/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Whilst customising one of the Microsoft Sharepoint application templates we needed to work out how to add a view of a list that was related to the item that was being shown in dispform.aspx.</p>
<p>To achieve this:</p>
<p>Add a DataViewWebPart (DVWP) in Sharepoint Designer</p>
<p>Set the DataSource of the DVWP to the related list you want to filter</p>
<p>Add a QueryStringParameter to the DVWP&#8217;s &lt;SharePoint:SPDataSource&gt; ==&gt; &lt;SelectParameters&gt; as follows:</p>
<p>&lt;asp:QueryStringParameter QueryStringField=&#8221;ID&#8221; name=&#8221;0&#8243;&gt;&lt;/asp:QueryStringParameter&gt;</p>
<p>Update the SelectCommand of the &lt;Sharepoint:SPDataSource&gt; as follows:</p>
<p>SelectCommand=&#8221;&amp;lt;View&amp;gt;&amp;lt;Query&amp;gt;&amp;lt;Where&amp;gt;&amp;lt;Eq&amp;gt;&amp;lt;FieldRef Name=&#8217;Meeting&#8217; Type=&#8217;Integer&#8217; LookupId=&#8217;True&#8217;&amp;gt;&amp;lt;/FieldRef&amp;gt;&amp;lt;Value Type=&#8217;Integer&#8217;&amp;gt;{0}&amp;lt;/Value&amp;gt;&amp;lt;/Eq&amp;gt;&amp;lt;/Where&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/View&amp;gt;&#8221;</p>
<p>This translates into the following CAML query:</p>
<p>SelectCommand=&#8221;&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=&#8217;Meeting&#8217; Type=&#8217;Integer&#8217; LookupId=&#8217;True&#8217;&gt;&lt;/FieldRef&gt;&lt;Value Type=&#8217;Integer&#8217;&gt;{0}&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;&#8221;</p>
<p>The LookupID=&#8217;True&#8217; parameter seems to make the query use the lookup fields List ID value.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/05/07/adding-a-related-filtered-list-to-a-sharepoint-lists-display-form-dispform-aspx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the &#8216;Workspace&#8217; option from a Sharepoint Calendar.</title>
		<link>http://www.devallday.com/2010/04/16/removing-the-workspace-option-from-a-sharepoint-calendar/</link>
		<comments>http://www.devallday.com/2010/04/16/removing-the-workspace-option-from-a-sharepoint-calendar/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 12:02:41 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Calendar]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=88</guid>
		<description><![CDATA[When adding an item to a calendar list in Sharepoint the default &#8216;New Item&#8217; form gives the user a checkbox option to &#8216;Use a Meeting Workspace to organize attendees, agendas, documents, minutes, and other details for this event.&#8217;.
This may be of use on team sites and for the right &#8217;savvy&#8217; users. However if using the  <a href="http://www.devallday.com/2010/04/16/removing-the-workspace-option-from-a-sharepoint-calendar/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>When adding an item to a calendar list in Sharepoint the default &#8216;New Item&#8217; form gives the user a checkbox option to &#8216;Use a Meeting Workspace to organize attendees, agendas, documents, minutes, and other details for this event.&#8217;.</p>
<p>This may be of use on team sites and for the right &#8217;savvy&#8217; users. However if using the Calendar in an environment with a wider audience such as an intranet this option can:</p>
<ul>
<li>Be confusing for the user.</li>
<li>Enable multiple workspace sites to be created without the site owners / site collection administrators knowledge or control.</li>
</ul>
<p>I have therefore found the need to remove the &#8216;Workspace&#8217; option from the New and Edit forms of the calendar.</p>
<p><span id="more-88"></span></p>
<p>To do this navigate to the &#8216;New Item&#8217; form for the calendar and replace the querystring values with ?ToolPaneView=2</p>
<p>e.g. http://yoursite/Lists/Calendar/NewForm.aspx?ToolPaneView=2</p>
<p>This handy technique allows you to add web parts to the page.</p>
<p>Add a Content Editor Web Part (CEWP) to the page and set it to appear in the same web part zone as the form but BELOW the form.</p>
<p>Choose the &#8216;Open the tool pane&#8217; option in the CEWP. Click the &#8216;Source Editor&#8217; button and paste in the following Javascript code.<br />
<code><br />
&lt;script type="text/javascript"&gt;<br />
var TDs = document.getElementsByTagName("TD");<br />
var i=0;<br />
var tagContent = "";<br />
while (i &lt; TDs.length)<br />
{<br />
try<br />
{<br />
tagContent = TDs[i].innerText || TDs[i].textContent;<br />
if (tagContent.indexOf("Workspace") == 0 || tagContent.indexOf("Workspace") == 3)<br />
{<br />
TDs[i+1].parentNode.removeChild(TDs[i+1]);<br />
TDs[i].parentNode.removeChild(TDs[i]);<br />
}<br />
}<br />
catch(err){}<br />
i=i+1;<br />
}<br />
&lt;/script&gt;<br />
</code></p>
<p>Click on the &#8220;open the tool pane&#8221; link in the CEWP and click the &#8220;Source Editor&#8230;&#8221; button.<br />
Paste the following code into the CEWP:</p>
<p>This snippet of Javascript by Ben Bradley hides the &#8216;Workspace&#8217; form data from the user so they a) are not confused by the presence of the &#8216;Workgroup&#8217; option and b) cannot check the checkbox.</p>
<p>Repeat this process for the &#8216;Edit Form&#8217; and the &#8216;Display&#8217; form for the calendar you are targetting.<br />
(EditForm.aspx?ToolPaneView=2 and DispForm.aspx?ToolPaneView=2).</p>
<h3>References</h3>
<p><a href="http://moblog.bradleyit.com/2008/10/disabling-workspaces-from-sharepoint.html?showComment=1224610080000" target="_blank">http://moblog.bradleyit.com/2008/10/disabling-workspaces-from-sharepoint.html?showComment=1224610080000</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/04/16/removing-the-workspace-option-from-a-sharepoint-calendar/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Render Content Query Web Part output as UL and OL lists rather than tables</title>
		<link>http://www.devallday.com/2010/03/16/render-content-query-web-part-output-as-ul-and-ol-lists-rather-than-tables/</link>
		<comments>http://www.devallday.com/2010/03/16/render-content-query-web-part-output-as-ul-and-ol-lists-rather-than-tables/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 12:33:52 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Content]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=78</guid>
		<description><![CDATA[The Content Query Web Part (CQWP) is an extremely powerful web part used for displaying content that can be pulled from multiple sites. However the default HTML rendered by the CQWP is full of nasty tables. A requirement was to use the cross site querying benefits of the CQWP but to be able to render  <a href="http://www.devallday.com/2010/03/16/render-content-query-web-part-output-as-ul-and-ol-lists-rather-than-tables/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>The Content Query Web Part (CQWP) is an extremely powerful web part used for displaying content that can be pulled from multiple sites. However the default HTML rendered by the CQWP is full of nasty tables. A requirement was to use the cross site querying benefits of the CQWP but to be able to render the output from it as unordered (UL) lists. Lists have a number of benefits including accessibility, semantic correctness and the ability to more easily target with CSS / javascript.</p>
<p>Sharepoint uses XSL style sheets to sculpt the HTML that is rendered by the Content Query Web Part (CQWP).  We therefore need the web part instance to use modified XSL style sheets.</p>
<p><span id="more-78"></span></p>
<h2>Create customised XSL files that the Content Query Web Part can use</h2>
<p>To prevent Sharepoint overwriting your custom rendering when applying hotfixes, service packs etc we will create copies of the default XSL style sheets and then make our Content Query Web Part use these copies. Then if the default XSL files are overwritten our bespoke rendering will not be wiped out.</p>
<p>Open Sharepoint Designer</p>
<p>Browse to /Style Library/XSL Style Sheets/</p>
<p>Make a copy of ItemStyle.xsl and name it BespokeItemStyle.xsl<br />
Make a copy of ContentQueryMain.xsl and name it BespokeContentQueryMain.xsl</p>
<p>Open BespokeContentQueryMain.xsl</p>
<p>Find the OuterTemplate template. Edit the XSL to remove the references to the table elements. Add the opening and closing UL or OL tags.</p>
<p><img class="alignnone size-full wp-image-82" title="OuterTemplateXSL" src="http://www.devallday.com/wp-content/uploads/2010/03/OuterTemplateXSL.gif" alt="OuterTemplateXSL" width="640" height="436" /></p>
<p>Next find the OuterTemplate.Body template. Remove the code that is used to determine how to render table columns and group by headings.</p>
<p><img class="alignnone size-full wp-image-81" title="OuterTemplate.Body" src="http://www.devallday.com/wp-content/uploads/2010/03/OuterTemplate.Body_.gif" alt="OuterTemplate.Body" width="510" height="180" /></p>
<p>Save and close the file.</p>
<p>Open BespokeItemStyle.xsl. This file contains a number of templates for rendering the items returned by the Content Query. The ItemStyle property of the web part will influence which of these templates is used to render the items. To specify which template to use modify the web part using the user interface.</p>
<p><img class="alignnone size-full wp-image-80" title="ContentQueryModifyItemStyle" src="http://www.devallday.com/wp-content/uploads/2010/03/ContentQueryModifyItemStyle.gif" alt="ContentQueryModifyItemStyle" width="293" height="700" /></p>
<p>For this example we are going to edit the &#8216;Title Only&#8217; template. Note we are outputting a LI element for each item in the query results.</p>
<div id="attachment_84" class="wp-caption alignnone" style="width: 741px"><img class="size-full wp-image-84" title="Title Only Item Template XSL" src="http://www.devallday.com/wp-content/uploads/2010/03/TitleOnlyItemTemplateXSL.gif" alt="Title Only Item Template XSL" width="731" height="256" /><p class="wp-caption-text">Title Only Item Template XSL</p></div>
<p>Save and close the file. If you wish you could edit all the templates to provide a more complete solution but for our initial needs we just want to be able to create a list of links that use the item title as their text.</p>
<h2>Create customised version of the Content Query web part that will use the modified XSL files.</h2>
<p>Add a Content Query Web part to your page and then export the web part to your desktop with a new name e.g. BespokeRenderingContentQuery.webpart . Open the .webpart file and edit the following two properties: MainXslLink and ItemXslLink. Make them point to the copied files you have just created.</p>
<p>&lt;property name=&#8221;MainXslLink&#8221; type=&#8221;string&#8221; &gt;/Style Library/XSL Style Sheets/BespokeContentQueryMain.xsl&lt;/property&gt;<br />
&lt;property name=&#8221;ItemXslLink&#8221; type=&#8221;string&#8221;&gt;/Style Library/XSL Style Sheets/BespokeItemStyle.xsl&lt;/property&gt;</p>
<p>Save the .webpart file and then upload it into the site collections web part gallery by going to Site Actions &gt; Site Settings &gt; Modify All Site Settings &gt; Web Part Gallery &gt; Upload</p>
<p><img class="alignnone size-full wp-image-83" title="SettingsWebPartGallery" src="http://www.devallday.com/wp-content/uploads/2010/03/SettingsWebPartGallery.gif" alt="SettingsWebPartGallery" width="202" height="195" /></p>
<p>Now go back to the page you want to add your modified web part to and add a new web part, select your modified Content Query web part. Make sure the &#8216;Title Only&#8217; style is selected for &#8216;Item Style&#8217;. Apply the changes and exit Edit Page mode. Refresh the page and  view the source. You should now see the items returned by the Content Query Web Part rendered as a list.</p>
<h3>References</h3>
<ul>
<li><a href="http://blogs.sharepointguys.com/brendon/sharepoint-2007/programming/connecting-the-cqwp-without-changing-itemstyle-xsl/" target="_blank">Brendon Sharepoint Guys &#8211; </a></li>
<li><a href="http://panvega.wordpress.com/2008/06/03/customize-itemstylexsl-for-contentquery-webpart/" target="_blank">Customise ItemStyle.xsl for content query web part</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/03/16/render-content-query-web-part-output-as-ul-and-ol-lists-rather-than-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Sharepoint Survey functionality to create basic web forms</title>
		<link>http://www.devallday.com/2010/03/05/using-sharepoint-survey-functionality-to-create-basic-web-forms/</link>
		<comments>http://www.devallday.com/2010/03/05/using-sharepoint-survey-functionality-to-create-basic-web-forms/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 12:58:54 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[surveys]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=74</guid>
		<description><![CDATA[The OOB MOSS 2007 Survey building functionality enables quick and easy to creation of nicely formatted web forms that might appear on an intranet or web site. The Survey approach does however have some shortcomings when wanting to process / view the data submitted.
For most forms we will not want a user to be able  <a href="http://www.devallday.com/2010/03/05/using-sharepoint-survey-functionality-to-create-basic-web-forms/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>The OOB MOSS 2007 Survey building functionality enables quick and easy to creation of nicely formatted web forms that might appear on an intranet or web site. The Survey approach does however have some shortcomings when wanting to process / view the data submitted.</p>
<div id="attachment_73" class="wp-caption alignnone" style="width: 510px"><img class="size-full wp-image-73" title="A simple Sharepoint Survey Response Form" src="http://www.devallday.com/wp-content/uploads/2010/03/SurveyForm.gif" alt="A simple feedback form created using Sharepoint Survey functionality" width="500" height="330" /><p class="wp-caption-text">A simple feedback form created using Sharepoint Survey functionality</p></div>
<p><span id="more-74"></span>For most forms we will not want a user to be able to view other peoples responses. Permissions must therefore be set to prevent users viewing and editing other peoples responses.<br />
Settings &gt; Survey Settings &gt; Advanced Settings</p>
<p><img class="alignnone size-full wp-image-72" title="SurveyAdvancedPermissions" src="http://www.devallday.com/wp-content/uploads/2010/03/SurveyAdvancedPermissions.gif" alt="SurveyAdvancedPermissions" width="500" height="262" /></p>
<p>To enable users to respond the survey you must give them contribute rights, e.g. give the ‘Sitename Visitors’ group permissions to the survey by going to:<br />
Settings &gt; Survey Settings &gt; Permissions for this survey &gt; Actions &gt; Edit Permissions.</p>
<p>You will be prompted if you want to break inheritance, click ‘OK’.</p>
<p>Tick the checkbox next to the group you want to be able to respond to the survey and go to Actions &gt; Edit User Permissions. Give them contribute rights. They won’t be able to delete other users responses if you have set the surveys advanced settings as above.</p>
<p>To enable the survey administrator to view all responses to a survey you must edit the survey permissions and give them either ‘Design’ or ‘Full Control’ permissions to the survey.</p>
<h2>Triggering email from Sharepoint Survey responses</h2>
<p>Ideally when the survey form was submitted it would trigger an email to the form owner.</p>
<h3>Alert Me</h3>
<p>The ‘Alert Me’ function of the Survey list cannot be used because the survey permissions have been set to only allow users to view their own responses.</p>
<p><img class="alignnone size-full wp-image-70" title="SuveyAlert" src="http://www.devallday.com/wp-content/uploads/2010/03/SuveyAlert.gif" alt="SuveyAlert" width="451" height="239" /></p>
<p>The resulting error message:</p>
<div id="attachment_71" class="wp-caption alignnone" style="width: 407px"><img class="size-full wp-image-71" title="No Alerts On Survey" src="http://www.devallday.com/wp-content/uploads/2010/03/NoAlertsOnSurvey.gif" alt="Error message when try to enable an alert on a survey when users can only view their own responses" width="397" height="122" /><p class="wp-caption-text">Error message when try to enable an alert on a survey when users can only view their own responses</p></div>
<h3>Workflows</h3>
<p>Workflows cannot be created that are started when someone responds to a survey,  see <a href="http://support.microsoft.com/kb/926370">http://support.microsoft.com/kb/926370</a> for more information.</p>
<p>Because of these shortcoming it would would mean that someone would have to monitor the survey by visiting the Survey to the survey page every day to check for new responses. This is not an ideal situation.</p>
<h2>Should you use MOSS surveys for creating web forms?</h2>
<p>To summarise there are pros and cons of using Sharepoint Surveys for quick and easy creation of web forms.<br />
Advantages</p>
<ul>
<li>Can remove burden from development team by enabling survey administrator to maintain question list.</li>
<li>Fast form building with common .NET functionality such as required fields and more advanced functionality such as branching.</li>
<li>Responses can easily be exported to spreadsheet functionality built in for use in reporting / backup / movement of data.</li>
<li>Authentication – users are already authenticated (if not using anonymous access on site), no need to reauthenticate.</li>
</ul>
<p>Disadvantages</p>
<ul>
<li> Cannot create an alert me when users can only view their own response</li>
<li>Cannot use workflow to trigger email to the survey administrator on a survey response.</li>
<li>Default navigation will link to the survey ‘homepage’ which is not the survey response page. To get round this a direct link to the response form could be added to the navigation.</li>
</ul>
<h3>References</h3>
<ul>
<li><a href="http://lichao.net/eblog/can-not-start-a-workflow-from-a-survey-response-in-windows-sharepoint-services-30-moss-2007-with-failed-to-start-error-200805142.html" target="_blank">WebGurus Blog – Cannot start a workflow from a survey response in MOSS 2007</a></li>
<li><a href="http://www.sadev.co.za/content/sharepoint-survey-permissions-1-respond-survey-do-not-edit-site-content" target="_blank">SADev &#8211; Sharepoint Survey Permissions 1</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/03/05/using-sharepoint-survey-functionality-to-create-basic-web-forms/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharepoint search &#8211; Create an ‘Alert Me’ on individual search results</title>
		<link>http://www.devallday.com/2010/03/01/sharepoint-search-create-an-%e2%80%98alert-me%e2%80%99-on-individual-search-results/</link>
		<comments>http://www.devallday.com/2010/03/01/sharepoint-search-create-an-%e2%80%98alert-me%e2%80%99-on-individual-search-results/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 15:25:52 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[MOSS Search]]></category>
		<category><![CDATA[SSP]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=63</guid>
		<description><![CDATA[The default MOSS search results page in a Sharepoint search center site allows the user to create an alert on a set of search results. It does not however give the user the ability to create alerts on individual items in the search results.
The following steps outline the process to add an ‘Alert Me’ link  <a href="http://www.devallday.com/2010/03/01/sharepoint-search-create-an-%e2%80%98alert-me%e2%80%99-on-individual-search-results/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>The default MOSS search results page in a Sharepoint search center site allows the user to create an alert on a set of search results. It does not however give the user the ability to create alerts on individual items in the search results.</p>
<p>The following steps outline the process to add an ‘Alert Me’ link to each individual search result.</p>
<p>The ‘New Alert’ screen is a OOB Sharepoint Application page that takes the following as querystring parameters</p>
<ul>
<li>the GUID of the list the document belongs to</li>
<li>the integer ID of the item in the list</li>
</ul>
<p>The main steps to enable alerts on individual search results are:</p>
<ul>
<li>Ensure the Sharepoint ID column is added to the SSP’s Managed Metadata properties.</li>
<li>Make sure this column is selected in the core search results web part data settings.</li>
<li>Edit the XSL to write out a hyperlink to a custom application page. The link must have the ID of the list item and the URL of the item added as querystring parameters.</li>
<li>Write a custom application page that redirects to the OOB application page located at /_layouts/SubNew.aspx and pass it the appropriate paramters in the querystring.</li>
</ul>
<p><span id="more-63"></span></p>
<h2>Add the required Managed Properties</h2>
<p>Open the Central Administration site. Select the relevant Shared Service Provider from the left hand menu.</p>
<p>Once the SSP administration site is open go to:</p>
<p>Search Settings &gt; Metadata Properties &gt; New Managed Property</p>
<p>Map the ows_ID(integer) crawled property to a new Managed Property called ListItemID which corresponds to the ID column of each Sharepoint list.</p>
<p><img title="List Item ID Managed Property" src="../wp-content/uploads/2010/03/2ListItemIDManagedProperty.gif" alt="List Item ID Managed Property" width="500" height="467" /></p>
<p>After you have created the Managed Property you must run a full crawl of the content source(s) to make sure the search index includes the new managed property.</p>
<p><img title="Start a Full Crawl" src="../wp-content/uploads/2010/03/3FullCrawl.gif" alt="Start a Full Crawl" width="541" height="276" /></p>
<h2>Add the List Item ID to the selected columns</h2>
<p>Now edit your search results page. Modify the Search Core Results web part by editing the Selected Columns property (in the Result Query Options property group). Add your ListItemID to the list of selected columns.</p>
<p><img class="alignnone size-full wp-image-64" title="Core search results additional Selected Columns" src="http://www.devallday.com/wp-content/uploads/2010/03/5AdditionalSelectedColumns.gif" alt="Core search results additional Selected Columns" width="498" height="347" /></p>
<p>You can now if you want check whether your ListItemID column is being successfully returned in the search results XML by following the method outlined by Andy Burns <a href="http://www.novolocus.com/2008/05/09/how-do-i-get-the-xml-of-my-search-results/" target="_blank">here</a>.</p>
<h2>Edit the XSL for the core search results web part</h2>
<p>Find the &lt;xsl:template match=&#8221;Result&#8221;&gt; entry in the XSL file. Directly under this add 2 new variables</p>
<p>&lt;!&#8211; Add additional variables for constructing Alert me links on individual search results &#8211;&gt;</p>
<p>&lt;xsl:variable name=&#8221;listitemid&#8221; select=&#8221;listitemid&#8221;/&gt;</p>
<p>&lt;xsl:variable name=&#8221;urlencoded&#8221; select=&#8221;urlEncoded&#8221;/&gt;</p>
<p>Then add the following code where required within the &lt;xsl:template match=”Result”&gt; element (after the above variable declarations).</p>
<p>&lt;!&#8211; Add link to custom application page which will redirect to the &#8216;Alert Me&#8217; screen for this document &#8211;&gt;</p>
<p>&lt;div&gt;</p>
<p>&lt;xsl:text disable-output-escaping=&#8221;yes&#8221;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;</p>
<p>&lt;img src=&#8221;/_layouts/images/bell.gif&#8221; alt=&#8221;Alert Me&#8221; /&gt;</p>
<p>&lt;a href=&#8221;http://myserver/_layouts/CustomSearchAlerts/myapplicationpage.aspx?ListItemID={$listitemid}&amp;amp;itemurl={$urlencoded}&#8221;&gt;Alert Me&lt;/a&gt;</p>
<p>&lt;/div&gt;</p>
<p>You should now have an ‘Alert Me’ hyperlink for each item in the search results. Now we need to create the custom application page that processes the list URL and</p>
<h2>Create the custom application page</h2>
<p>Create a custom application page which will be located in the 12 hive at /Template/Layouts/CustomSearchAlerts/. This page will not display anything to the user, it merely calculates the querystring parameters required by the ‘New Alert’ page and then redirects them to this page.</p>
<p>We can use the URL of the list item to indirectly obtain a SPList object. We can then get the GUID of the list which is what we need (along with the itemID) to pass to the ‘Create new alert’ page.</p>
<pre>protected void Page_Load(object sender, EventArgs e)

{

int listItemID = Convert.ToInt32(Request.QueryString["listitemid"]);

string itemURL = Server.UrlDecode(Request.QueryString["itemurl"]);

// get up to the .com

int endOfHostNamePos = itemURL.IndexOf(".com") + 7;

// get the second forward slash in the URL

int endOfListPath = itemURL.IndexOf("/", endOfHostNamePos + 2);

string hostname = itemURL.Substring(0, endOfHostNamePos);

string listPath = itemURL.Substring(endOfHostNamePos + 1, endOfListPath - endOfHostNamePos - 1);

string listURL = hostname + "/" + listPath + "/";

string redirectURL;

lblMessage.Text = String.Format("ItemURL: {0} &lt;br /&gt;ListItemID: {1} &lt;br /&gt;Hostname: {2} &lt;br /&gt;Library Path: {3} &lt;br /&gt;Library URL: {4}",

itemURL,

listItemID,

hostname,

listPath,

listURL);

// create an instance of the list so we can get the lists' GUID...

using (SPSite ListSite = new SPSite(listURL))

{

// Check for null

if (ListSite == null)

{

throw new SPException("Unable to locate site.");

}

// Get the List Web

using (SPWeb ListWeb = ListSite.OpenWeb())

{

// Check for null

if (ListWeb == null)

{

throw new SPException("Unable to open web.");

}

// Get the List

SPList TheList = ListWeb.GetList(listURL);

// Check for null

if (TheList == null)

{

throw new SPException("Unable to find list.");

}

else

{

// You can now use "TheList" reference from nothing more than a URL to the List

lblMessage.Text += "&lt;br /&gt;List found..." + TheList.ID;

redirectURL = hostname + "/_layouts/SubNew.aspx?List={" + TheList.ID + "}&amp;ID=" + listItemID + "&amp;Source=http://intranet.nottingahmcity.nhs.uk";

lblMessage.Text += "&lt;br /&gt;RedirectURL: " + redirectURL;

}

} // SPWeb.Dipose();

} // SPSite.Dispose();

if (redirectURL != null &amp;&amp; redirectURL != "")

{

Response.Redirect(redirectURL);

}

}</pre>
<h3>References</h3>
<ul>
<li><a href="http://www.sharepointsecurity.com/sharepoint/sharepoint-2007-development/get-splist-by-url-in-c/" target="_blank">Get SPList by URL in C#</a></li>
<li><a href="http://www.novolocus.com/2008/05/09/how-do-i-get-the-xml-of-my-search-results/" target="_blank">How do I get the XML of my search results?</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/03/01/sharepoint-search-create-an-%e2%80%98alert-me%e2%80%99-on-individual-search-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create flexible web parts with web part editor properties that hold xml configuration elements</title>
		<link>http://www.devallday.com/2010/02/24/create-flexible-web-parts-with-web-part-editor-properties-that-hold-xml-configuration-elements/</link>
		<comments>http://www.devallday.com/2010/02/24/create-flexible-web-parts-with-web-part-editor-properties-that-hold-xml-configuration-elements/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 12:19:41 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=54</guid>
		<description><![CDATA[One of the design goals when creating web parts is to make the web part reusable across a number of site collections and web applications where each site administrator may have slightly differing requirements.
To a degree this is achieved by defining web part properties  that appear in the web part editor that enable the  <a href="http://www.devallday.com/2010/02/24/create-flexible-web-parts-with-web-part-editor-properties-that-hold-xml-configuration-elements/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>One of the design goals when creating web parts is to make the web part reusable across a number of site collections and web applications where each site administrator may have slightly differing requirements.</p>
<p>To a degree this is achieved by defining web part properties  that appear in the web part editor that enable the user to use standard web controls such as textboxes, radio button lists and drop down lists to set the web parts configuration options.</p>
<p>There may be times however where more complex data storage requirements are required for configuration and this is where XML can help by configuring a web part property to store XML which can be parsed and manipulated by the web parts code.<span id="more-54"></span></p>
<p>This example modifes the Nomine AD User Tools web part that <a href="http://www.devallday.com/2010/02/16/sharepoint-web-part-to-enable-user-to-update-their-ad-profile/">enables a user to update their own Active Directory user profile</a>. The idea is to enable the web part administrator to be able to create a calculated value for storing in the Active Directory &#8216;Display Name&#8217; field to ensure consistency across the organisation. The organisation requires the fields and punctuation in the following format.</p>
<p>Display Name = Surname, First Name &#8211; Job Title &#8211; Department</p>
<p>To make this aspect of the web part reuseable for another organisation who may have different fields / punctuation we can store the makeup of the Displayname field in an xml configuration file that the web part administrator can edit. The following is the XML code created for storing in the web parts FullNameProperties property.</p>
<pre>
&lt;fullNameProperties&gt;
	&lt;property adname='sn' trailingseperator=', ' /&gt;
	&lt;property adname='givenName' trailingseperator=' - ' /&gt;
	&lt;property adname='department' trailingseperator=' - ' /&gt;
	&lt;property adname='title' trailingseperator='' /&gt;
&lt;/fullNameProperties&gt;
</pre>
<p>The following code can then be added to the web part to enable the storage and parsing of this information to enable the display name to be calculated before updating the users profile. The key to this is the code added to the CreateChildControls() sub that uses the XmlTextReader object to read the xml out of the web part property and then uses the XmlTextReader to traverse the xml and pick out the values that are required to build the Display Name string.</p>
<pre>// defined at Class scope
private struct fullNameProperty
{
public string ADName;
public string TrailingSeperator;
}

private string _FullNameProperties = "";
[SPWebCategoryName("Configuration"),
FriendlyName("Display Name Config"),
WebBrowsable(true),
Personalizable(true)]
public string FullNameProperties
{
get { return _FullNameProperties; }
set { _FullNameProperties = value; }
}

// in the CreateChildControls() sub
fullNameProperties = new List();

XmlTextReader config_fullNameXML = new XmlTextReader(new System.IO.StringReader(_FullNameProperties));
config_fullNameXML.WhitespaceHandling = WhitespaceHandling.None;

while (config_fullNameXML.Read())
{
if (config_fullNameXML.NodeType == XmlNodeType.Element &amp;&amp; config_fullNameXML.Name == "property")
{
fullNameProperties.Add(makeFullNameProperty(config_fullNameXML.GetAttribute("adname"),

config_fullNameXML.GetAttribute("trailingseperator")));
}
}

// in the apply_click() sub
string fullNameValue = "";
foreach (fullNameProperty fnProp in fullNameProperties)
{
if(fullNameValue == "")
{
fullNameValue = getFullNamePropertyValue(fnProp.ADName) + fnProp.TrailingSeperator;
}
else
{
string fnpv = getFullNamePropertyValue(fnProp.ADName);
if (fnpv != "")
{
fullNameValue += fnpv + fnProp.TrailingSeperator;
}
}
}

// helper functions
private fullNameProperty makeFullNameProperty(string ADName, string TrailingSeperator)
{
fullNameProperty fnp;
fnp.ADName = ADName;
fnp.TrailingSeperator = TrailingSeperator;
return fnp;
}

private string getFullNamePropertyValue(string ADName)
{
// loop through userProperties and find one that matches the fullName property
foreach(userProperty prop in userProperties)
{
if (prop.ADName == ADName)
{
// return the value out of the form that corresponds to this property
switch (prop.Type)
{
case "textbox":
TextBox t = (TextBox)EditFields[prop.ADName];
return t.Text.Trim();
case "listbox":
ListBox lb = (ListBox)EditFields[prop.ADName];
return lb.SelectedValue.Trim();
case "dropdown":
DropDownList dl = (DropDownList)EditFields[prop.ADName];
return dl.SelectedValue.Trim();
default: break;
}
}
}

// no match found so return blank string
return "";
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/02/24/create-flexible-web-parts-with-web-part-editor-properties-that-hold-xml-configuration-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sharepoint People search results  &#8211; adding additional user profile properties</title>
		<link>http://www.devallday.com/2010/02/18/sharepoint-people-search-results-adding-additional-user-profile-properties/</link>
		<comments>http://www.devallday.com/2010/02/18/sharepoint-people-search-results-adding-additional-user-profile-properties/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 13:01:57 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[MOSS Search]]></category>
		<category><![CDATA[Sharepoint Designer]]></category>
		<category><![CDATA[SSP]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=37</guid>
		<description><![CDATA[This post describes the step by step process required to add additional metadata properties to the MOSS people search results.
By default the MOSS people search only returns a limited number of AD fields such as Job Title and Department. What happens if you want to add additional fields such as Mobile Telephone?
The solution to this  <a href="http://www.devallday.com/2010/02/18/sharepoint-people-search-results-adding-additional-user-profile-properties/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>This post describes the step by step process required to add additional metadata properties to the MOSS people search results.</p>
<p>By default the MOSS people search only returns a limited number of AD fields such as Job Title and Department. What happens if you want to add additional fields such as Mobile Telephone?</p>
<p>The solution to this is a 3 step process:</p>
<ul>
<li>Make sure the user profile attributes you want to include in the search results are crawled and mapped to Managed Properties.</li>
<li>Edit the PeopleSearchResult.aspx file in Sharepoint Designer if you want the additional property to appear in the <em>Refine Your Search</em> section of the search results page. This file can be found in the Masterpage Gallery.</li>
<li>Edit the peopleresults.aspx page in the search center site to make sure the new columns are included</li>
</ul>
<p><span id="more-37"></span></p>
<h3>Map the user profile attributes to Managed Properties</h3>
<p>Open Central Administration. Click on the required Shared Service Administration item in the left navigation.</p>
<p><img class="alignnone size-full wp-image-39" title="Central Administration" src="http://www.devallday.com/wp-content/uploads/2010/02/1CentralAdmin.gif" alt="Central Administration" width="270" height="277" /></p>
<p>Click on <em>Search Administration</em>.</p>
<p>Click on <em>Metadata Properties</em> in the left navigation.</p>
<p><img title=" Metadata Properties" src="../wp-content/uploads/2010/02/2MetadataProperties.gif" alt=" Metadata Properties" width="138" height="173" /></p>
<p>Review the managed properties to see if the profile attribute already exists. For example you can see there is already a ‘Department’ managed property that has mappings to the following crawled properties: <em>People:Department(Text)</em> and <em>ows_Department(Text)</em>.</p>
<p><img class="alignnone size-full wp-image-41" title="Department Managed Property" src="http://www.devallday.com/wp-content/uploads/2010/02/3DepartmentManagedProperty.gif" alt="Department Managed Property" width="500" height="39" /></p>
<p>If the Managed Property already exists great, you can exit from the SSP administration. If not then first check if the Property you require is mapped under a different name. For instance the AD column <em>telephoneNumber </em>with a display name of <em>Telephone Number</em> is mapped to the <em>Work phone</em> property in the Sharepoint User Profile database. This crawled property is mapped to the Work Phone managed property as seen below.</p>
<p><img class="alignnone size-full wp-image-42" title="WorkPhone Managed Property" src="http://www.devallday.com/wp-content/uploads/2010/02/4WorkPhoneManagedProperty.gif" alt="WorkPhone Managed Property" width="466" height="73" /></p>
<p>A common list of AD properties and how they relate to the Sharepoint User Profile database is shown below (source <a href="http://blogs.msdn.com/uksharepoint/archive/2009/05/04/quicktip-ad-properties-mapped-to-sharepoint-profiles.aspx">Microsoft UK Sharepoint team blog</a>).</p>
<table border="0" cellspacing="0" cellpadding="3" width="256">
<tbody>
<tr>
<td><strong>Property Name</strong></td>
<td><strong>Mapped Attribute/AD Internal Property</strong></td>
<td><strong><span>AD Display Name</span></strong></td>
<td><strong>AD Property Tab</strong></td>
</tr>
<tr>
<td>SID</td>
<td>objectSID</td>
<td>Generated on object creation</td>
<td>N/A</td>
</tr>
<tr>
<td>Active Directory Id</td>
<td>objectGuid</td>
<td>Generated on Object Create</td>
<td>N/A</td>
</tr>
<tr>
<td>Account name</td>
<td>&lt;Specific to connection&gt;</td>
<td>User logon Name</td>
<td>Account</td>
</tr>
<tr>
<td>First name</td>
<td>givenName</td>
<td>First Name</td>
<td>General</td>
</tr>
<tr>
<td>Last name</td>
<td>sn</td>
<td>Last Name</td>
<td>General</td>
</tr>
<tr>
<td>Name</td>
<td>displayName</td>
<td>Display Name</td>
<td>General</td>
</tr>
<tr>
<td> </td>
<td>telephoneNumber</td>
<td>Telephone Number</td>
<td>General</td>
</tr>
<tr>
<td>Office</td>
<td>physicalDeliveryOfficeName</td>
<td>Office</td>
<td>General</td>
</tr>
<tr>
<td>Department</td>
<td>department</td>
<td>Department</td>
<td>Organisation</td>
</tr>
<tr>
<td>Title</td>
<td>title</td>
<td>Job Title</td>
<td>Organisation</td>
</tr>
<tr>
<td>Manager</td>
<td>manager</td>
<td>Manager &gt; Name</td>
<td>Organisation</td>
</tr>
<tr>
<td>User name</td>
<td>samAccountName</td>
<td>Generated on account creation based on users name</td>
<td>General</td>
</tr>
<tr>
<td>Public site redirect</td>
<td>wWWHomePage</td>
<td>Web Page</td>
<td>General</td>
</tr>
<tr>
<td>SIP Address</td>
<td>msRTCSIP-PrimaryUserAddress</td>
<td>Available when OCS is installed within a domain</td>
<td>N/A</td>
</tr>
<tr>
<td>Proxy addresses</td>
<td>proxyAddresses</td>
<td>Available when Exchange is installed within a domain</td>
<td>N/A</td>
</tr>
<tr>
<td>Master Account Name</td>
<td>msDS-SourceObjectDN</td>
<td>Avaialble when OCS is installed within a domain</td>
<td>N/A</td>
</tr>
<tr>
<td>Work e-mail</td>
<td>mail</td>
<td>E-mail</td>
<td>General</td>
</tr>
</tbody>
</table>
<p>You can find the full list of the Sharepoint User Profile properties by going to the SSP administration home and selecting User Profiles and Properties, then scroll to the bottom of the page and select ‘View User Properties’.</p>
<p><img class="alignnone size-full wp-image-43" title="User Profile Properties" src="http://www.devallday.com/wp-content/uploads/2010/02/5UserProfileProperties.gif" alt="User Profile Properties" width="500" height="364" /></p>
<p>Another example is the AD property of physicalDeliveryOfficeName with and AD display name of Office. The Sharepoint crawled property People:Office(Text) is mapped to the OfficeNumber managed property.</p>
<p><img class="alignnone size-full wp-image-44" title="People:Office Crawled Propertygif" src="http://www.devallday.com/wp-content/uploads/2010/02/6PeopleOfficeCrawledPropertygif.gif" alt="People:Office Crawled Propertygif" width="500" height="31" /></p>
<h3>Edit the People Search Results Master Page</h3>
<p>If you want your additional column to be displayed on the <strong>Refine Your Search</strong> section of the page then complete this stage otherwise skip to Edit the Search Core Results Web Part. Some properties will be beneficial to be able to refine by such as Office, others such as Telephone number will be of no use in the Refine Your Search section.</p>
<p>Open Sharepoint Designer (SP designer 2007 is now a free download). Open the root site of the site collection as this is where the Master Page gallery is held. Browse to the masterpage gallery and open PeopleSearchResults.aspx</p>
<p><img class="alignnone size-full wp-image-45" title="Edit PeopleSearchResults.aspx" src="http://www.devallday.com/wp-content/uploads/2010/02/7EditPeopleSearchResultsMaster.gif" alt="Edit PeopleSearchResults.aspx" width="186" height="738" /></p>
<p>Use Ctrl + F to find <em>&lt;SearchWC:RefineSearchResults</em>. You should jump to a section of the page that contains the following tags:</p>
<p>&lt;SEARCHWC:RefineSearchResults runat=&#8221;server&#8221; Title=&#8221;&lt;%$Resources:sps,RefineByTitle%&gt;&#8221; SearchProperty=&#8221;JobTitle&#8221;/&gt;</p>
<p>&lt;SEARCHWC:RefineSearchResults runat=&#8221;server&#8221; Title=&#8221;&lt;%$Resources:sps,RefineByDepartment%&gt;&#8221; SearchProperty=&#8221;Department&#8221;/&gt;</p>
<p>You can now add your own entry below these:</p>
<p>&lt;SEARCHWC:RefineSearchResults runat=&#8221;server&#8221; Title=&#8221;Refine by Office&#8221; SearchProperty=&#8221;Office&#8221;/&gt;</p>
<p>&lt;SEARCHWC:RefineSearchResults runat=&#8221;server&#8221; Title=&#8221;Refine by Telephone&#8221; SearchProperty=&#8221;WorkPhone&#8221;/&gt;</p>
<p>Save the file and check it back in (you may need to approve the file in which case SP designer will open the approval page for you (you will need to be signed in with an account with sufficient privileges to do this.</p>
<p><img class="alignnone size-full wp-image-46" title="Approve People Search Results Master" src="http://www.devallday.com/wp-content/uploads/2010/02/8ApprovePeopleSearchResultsMaster.gif" alt="Approve People Search Results Master" width="500" height="64" /></p>
<h3>Edit the Search Core Results web part on your search results page</h3>
<p>Perform a people search and check you are on peopleresults.aspx. Go to Site Actions &gt; Edit Page to put the page into edit mode.</p>
<p>Choose to modify the Search Core Results web part. Under <em>Result Query Options</em> click on the ‘…’ button next to <em>Selected Columns</em>.</p>
<p><img class="alignnone size-full wp-image-38" title="People Search Core Results Selected Columns" src="http://www.devallday.com/wp-content/uploads/2010/02/9PeopleSearchCoreResultsSelectedColumns.gif" alt="People Search Core Results Selected Columns" width="227" height="516" /></p>
<p>You can copy and paste the displayed XML into Visual Studio to make for easier editing if you want. Add the column(s) that you want added to the displayed columns, e.g.</p>
<p>&lt;Column Name=&#8221;MobilePhone&#8221; /&gt;</p>
<p>You must perform this step if you want the column to appear in the ‘Refine your results’ options.</p>
<p>You can then modify the People Search Core Results Data View Properties by editing the XSL file to configure how the additional column is displayed and formatted.</p>
<p><img class="alignnone size-full wp-image-49" title="People Search Core Results XSLEditor" src="http://www.devallday.com/wp-content/uploads/2010/02/10PeopleSearchCoreResultsXSLEditor.gif" alt="People Search Core Results XSLEditor" width="227" height="516" /></p>
<p>Hope this helps you customise your People Search results.</p>
<h3>References</h3>
<ul>
<li><a href="http://blogs.msdn.com/jojok/archive/2008/04/13/refine-people-search-by-additional-managed-profile-properties.aspx">Jo Jo Koshy Refine People search by adding additional managed properties</a></li>
<li><a href="http://blogs.msdn.com/uksharepoint/archive/2009/05/04/quicktip-ad-properties-mapped-to-sharepoint-profiles.aspx">Microsoft UK Sharepoint team blog</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/02/18/sharepoint-people-search-results-adding-additional-user-profile-properties/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Enable anonymous responses to a Sharepoint Survey</title>
		<link>http://www.devallday.com/2010/02/17/enable-anonymous-responses-to-a-sharepoint-survey/</link>
		<comments>http://www.devallday.com/2010/02/17/enable-anonymous-responses-to-a-sharepoint-survey/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 12:50:30 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[surveys]]></category>

		<guid isPermaLink="false">http://www.devallday.com/?p=23</guid>
		<description><![CDATA[Enabling anonymous responses to a Sharepoint Survey is a common requirement and can help improve survey response rates especially where the survey covers sensitive issues such as appraisals / reviews / complaints etc.
This post aims to give a step by step guide to the actions required to enable anonymous responses to  a survey.
Go to the  <a href="http://www.devallday.com/2010/02/17/enable-anonymous-responses-to-a-sharepoint-survey/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Enabling anonymous responses to a Sharepoint Survey is a common requirement and can help improve survey response rates especially where the survey covers sensitive issues such as appraisals / reviews / complaints etc.</p>
<p>This post aims to give a step by step guide to the actions required to enable anonymous responses to  a survey.<span id="more-23"></span></p>
<p>Go to the <em>Survey Settings</em>.</p>
<div id="attachment_24" class="wp-caption alignnone" style="width: 516px"><img class="size-full wp-image-24" title="Survey Settings link" src="http://www.devallday.com/wp-content/uploads/2010/02/SurveySettings.gif" alt="Survey Settings link" width="506" height="156" /><p class="wp-caption-text">Survey Settings link</p></div>
<p>Go to <em>Advanced Settings</em>.</p>
<p>Make sure that ‘Read Access’ is set to ‘All Responses’.</p>
<div id="attachment_26" class="wp-caption alignnone" style="width: 554px"><img class="size-full wp-image-26" title="Survey Advanced Settings" src="http://www.devallday.com/wp-content/uploads/2010/02/SurveyAdvancedSettings.gif" alt="Survey Advanced Settings" width="544" height="336" /><p class="wp-caption-text">Survey Advanced Settings</p></div>
<p>Go to <em>Survey Settings</em> &gt; <em>Permissions for this survey</em>.</p>
<p><img class="alignnone size-full wp-image-27" title="Survey Settings Permissions" src="http://www.devallday.com/wp-content/uploads/2010/02/SurveySettingsPermissions1.gif" alt="Survey Settings Permissions" width="541" height="354" /></p>
<p>Choose to Edit Permissions. This will copy and then break the inherited permissions from the site.</p>
<div id="attachment_28" class="wp-caption alignnone" style="width: 420px"><img class="size-full wp-image-28" title="Survey Settings Edit Permissions" src="http://www.devallday.com/wp-content/uploads/2010/02/SurveySettingsPermissions2.gif" alt="Survey Settings Edit Permissions" width="410" height="187" /><p class="wp-caption-text">Survey Settings Edit Permissions</p></div>
<p>On the Edit Permissions screen go to Settings &gt; Anonymous Access.</p>
<p>Tick the ‘Add Items’ option and then click the ‘OK’ button.</p>
<div id="attachment_25" class="wp-caption alignnone" style="width: 585px"><img class="size-full wp-image-25" title="Survey Anonymous Permissions - Add Items" src="http://www.devallday.com/wp-content/uploads/2010/02/SurveySettingsPermissionsAnonymous.gif" alt="Survey Anonymous Permissions - Add Items" width="575" height="184" /><p class="wp-caption-text">Survey Anonymous Permissions - Add Items</p></div>
<p>Your survey should now be available to anonymous users to respond to.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/02/17/enable-anonymous-responses-to-a-sharepoint-survey/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharepoint web part to enable user to update their AD profile</title>
		<link>http://www.devallday.com/2010/02/16/sharepoint-web-part-to-enable-user-to-update-their-ad-profile/</link>
		<comments>http://www.devallday.com/2010/02/16/sharepoint-web-part-to-enable-user-to-update-their-ad-profile/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 12:35:11 +0000</pubDate>
		<dc:creator>DevAllDay</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Web Parts]]></category>

		<guid isPermaLink="false">http://devallday.com/?p=17</guid>
		<description><![CDATA[I have come across the Nomine AD User Editor on Codeplex and found it to be an excellent free web part that enables a user to be able to update their own Active Directory profile. The web part lets the site owner edit the AD fields that appear on the form by using a simple  <a href="http://www.devallday.com/2010/02/16/sharepoint-web-part-to-enable-user-to-update-their-ad-profile/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I have come across the <a href="http://nominesptools.codeplex.com/" target="_blank">Nomine AD User Editor</a> on Codeplex and found it to be an excellent free web part that enables a user to be able to update their own Active Directory profile. The web part lets the site owner edit the AD fields that appear on the form by using a simple XML configuration file.  The web part supports the following form elements:</p>
<ul>
<li>Textbox</li>
<li>Drop down list</li>
<li>Listbox</li>
<li>People Picker</li>
<li>Date Picker (with Calendar)</li>
</ul>
<p>There are a couple of gotchas to lookout for when using it.</p>
<ol>
<li>By default it lets the user search Active Directory and edit any user profile so when configuring the web part for a user to update their own active directory profile make sure to:
<ul>
<li>Tick ‘Edit Current User Only’.</li>
<li>Untick ‘Allow Editing In Personal Mode’ or else the user will be able to edit their personal view of the web part</li>
<li>
<p><div id="attachment_18" class="wp-caption alignnone" style="width: 234px"><img class="size-full wp-image-18" title="Nomine AD User Editor Configuration" src="http://devallday.com/wp-content/uploads/2010/02/NomineADUserEditorConfiguration.gif" alt="Nomine AD User Editor Configuration" width="224" height="422" /><p class="wp-caption-text">Nomine AD User Editor Configuration</p></div></li>
</ul>
</li>
<li>Create a new web application specifically for deploying this web part to. This is because the web part is activated as a feature at Site Collection level and if you deploy to another application such as an intranet then any site collection administrators on any site collection in the application will be able to add the web part to their pages and if they do they will doubtless forget / be unaware of the two previous configuration steps outlined above and you will then have any user being able to update any other users details.</li>
</ol>
<p>All in all this is a great web part that dynamically creates the edit user form using information from the xml configuration.</p>
<p>A wish list for the web part would be to</p>
<ul>
<li>Support encrypted passwords in the .config file so that the details of the AD account were not exposed in free text.</li>
<li>Give a ‘Details updated successfully’ type prompt after the user submits the form.</li>
<li>Make the ‘Edit Current User Only’ property read only if editing the web part in personal mode.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.devallday.com/2010/02/16/sharepoint-web-part-to-enable-user-to-update-their-ad-profile/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

