Posts tagged Sharepoint
Adding a related filtered list to a Sharepoint list’s Display Form (dispform.aspx)
May 7th
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=”<View><Query><Where><Eq><FieldRef Name=’Meeting’ Type=’Integer’ LookupId=’True’></FieldRef><Value Type=’Integer’>{0}</Value></Eq></Where></Query></View>”
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.
Removing the ‘Workspace’ option from a Sharepoint Calendar.
Apr 16th
When adding an item to a calendar list in Sharepoint the default ‘New Item’ form gives the user a checkbox option to ‘Use a Meeting Workspace to organize attendees, agendas, documents, minutes, and other details for this event.’.
This may be of use on team sites and for the right ’savvy’ users. However if using the Calendar in an environment with a wider audience such as an intranet this option can:
- Be confusing for the user.
- Enable multiple workspace sites to be created without the site owners / site collection administrators knowledge or control.
I have therefore found the need to remove the ‘Workspace’ option from the New and Edit forms of the calendar.
Render Content Query Web Part output as UL and OL lists rather than tables
Mar 16th
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.
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.
Using Sharepoint Survey functionality to create basic web forms
Mar 5th
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.

A simple feedback form created using Sharepoint Survey functionality
Sharepoint search – Create an ‘Alert Me’ on individual search results
Mar 1st
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 to each individual search result.
The ‘New Alert’ screen is a OOB Sharepoint Application page that takes the following as querystring parameters
- the GUID of the list the document belongs to
- the integer ID of the item in the list
The main steps to enable alerts on individual search results are:
- Ensure the Sharepoint ID column is added to the SSP’s Managed Metadata properties.
- Make sure this column is selected in the core search results web part data settings.
- 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.
- 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.
Create flexible web parts with web part editor properties that hold xml configuration elements
Feb 24th
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 user to use standard web controls such as textboxes, radio button lists and drop down lists to set the web parts configuration options.
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. More >
Sharepoint People search results – adding additional user profile properties
Feb 18th
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
Enable anonymous responses to a Sharepoint Survey
Feb 17th
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. More >
Sharepoint web part to enable user to update their AD profile
Feb 16th
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 XML configuration file. The web part supports the following form elements:
- Textbox
- Drop down list
- Listbox
- People Picker
- Date Picker (with Calendar)
There are a couple of gotchas to lookout for when using it.
- 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:
- Tick ‘Edit Current User Only’.
- Untick ‘Allow Editing In Personal Mode’ or else the user will be able to edit their personal view of the web part
-

Nomine AD User Editor Configuration
- 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.
All in all this is a great web part that dynamically creates the edit user form using information from the xml configuration.
A wish list for the web part would be to
- Support encrypted passwords in the .config file so that the details of the AD account were not exposed in free text.
- Give a ‘Details updated successfully’ type prompt after the user submits the form.
- Make the ‘Edit Current User Only’ property read only if editing the web part in personal mode.
Sharepoint Content Deployment illustrated from start to finish
Feb 15th
This article shows a start to finish process for setting up Content Deployment in a Sharepoint environment. Content Deployment can be useful in a number of situations including:
- sharing information between sharepoint applications
- deploying from a staging environment into a live environment
- pushing content from an internal sharepoint intranet farm to an external sharepoint internet facing farm More >