FAQ - Web Part Connections

SharePoint allows you to connect together web parts in order to pass data between them.

You can use this feature to display data from one web part in another web part or filter the data in a web part depending on the information passed in.

Consult SharePoints online help or this page for more information. 

SharePoint Planner is a Filter Consumer - meaning that it will take information provided to it and filter the display accordingly. For example you could pass in a filter of "High" and get Planner to show only High priority tasks.

You can configure how Planner uses these filter values using the Filter configuration toolpart.

  • How do I setup a web part connection?

This example is going to be based around the tasks involved in a fictitious building project. As we don't want to develop any custom filter providers we are going to have a separate list containing the Contractors for our project and we will add a Lookup field to this Contractor list into our Task list. In this way we can use the Contractor list to filter our Building Project task list.

On this page we have added a SharePoint Planner web part to display our building tasks and the Contractor List. We have modified the Contractor list to only display the name.

Next we will setup the filter -

  • Select the Web Part Menu
  • Select Modify Shared Web Part
  • Select the web part Manu again
  • Select Connections > Consume Filter From
    and the appropriate web part

  • Select the appropriate column from the Contractors web part

  • Select the column that contains matching information in the Building Project task list

  • Now you can filter the display to only include only tasks assigned to the Contractor selected :-

  • I need to filter by a Choice field, how can I do this?

If you need to filter by a value that isn't in a lookup list (e.g. Priority - High/Med/Low) then you will need to create a custom filter provider web part.

The easiest way to do this (although you will still need HTML skills) is to add a Form Web Part to the page and then use the Source Editor to write HTML to display a list of the values you wish to filter by using a Select list or Radio Button list. Then connect the web parts in the usual manner.

For example this HTML displays a drop down list showing Priority that you could use in a Form Web Part to filter a task list.

<div>
<select name="Priority" onchange="javascript:_SFSUBMIT_">
    <option value="(1) High">(1) High</option>
    <option value="(2) Normal">(2) Normal</option>
    <option value="(3) Low">(3) Low</option>
</select>
</div>

Tips

  • You can use the same techniques to supply Filters to SharePoints own lists.

  • Many web parts can accept or provide multiple filters. In the example shown above you could supply a Contractor filter to both a SharePoint Planner web part and a task list - experiment to see what's possible!

  • MOSS 2007 includes several web parts to assist in filtering - check the online documentation.