Posts tagged Sharepoint Designer

Creating a dataview report based on calculated dates on a linked data source in Sharepoint Designer

Scenario – 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’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 ‘all items modified in the last 14 days’, ‘all articles with an expiry date in the next 6 months’ etc. More >

Adding a related filtered list to a Sharepoint list’s Display Form (dispform.aspx)

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 QueryStringParameter to the DVWP’s <SharePoint:SPDataSource> ==> <SelectParameters> as follows:

<asp:QueryStringParameter QueryStringField=”ID” name=”0″></asp:QueryStringParameter>

Update the SelectCommand of the <Sharepoint:SPDataSource> as follows:

SelectCommand=”&lt;View&gt;&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name=’Meeting’ Type=’Integer’ LookupId=’True’&gt;&lt;/FieldRef&gt;&lt;Value Type=’Integer’&gt;{0}&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;&lt;/View&gt;”

This translates into the following CAML query:

SelectCommand=”<View><Query><Where><Eq><FieldRef Name=’Meeting’ Type=’Integer’ LookupId=’True’></FieldRef><Value Type=’Integer’>{0}</Value></Eq></Where></Query></View>”

The LookupID=’True’ parameter seems to make the query use the lookup fields List ID value.

Sharepoint People search results – adding additional user profile properties

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 is a 3 step process:

  • Make sure the user profile attributes you want to include in the search results are crawled and mapped to Managed Properties.
  • Edit the PeopleSearchResult.aspx file in Sharepoint Designer if you want the additional property to appear in the Refine Your Search section of the search results page. This file can be found in the Masterpage Gallery.
  • Edit the peopleresults.aspx page in the search center site to make sure the new columns are included

More >