1,804 articles and 14,810 comments as of Friday, May 6th, 2011

EndUserSharePoint has combined resources with NothingButSharePoint.com. You can now find End User (Mark Miller), Developer (Jeremy Thake) and IT Pro SharePoint content all in one place!

This site is a historical archive and is no longer being updated. Please update your favorites, bookmarks and RSS feeds.

NothingButSharePoint.com
Sunday, November 18, 2007

Use a web part to filter the display in another web part

The Connection functionality between web parts allows one web part to drive or filter the content of another web part on the same page. As an example, a web part displaying a list of information types such as Budget, Contract and Expense Report can be used to filter a Finance Reports Library displayed in a second web part.

Web parts can be chained together in sequence to do multiple filters. The quick demo below shows the process for linking two web parts, using the Finance Report Library as described above.


It would be nice to hear of some real world examples on how this will be useful. After viewing the demo, let me know how you might use this for filtering your output.

 

Please Join the Discussion

32 Responses to “Use a web part to filter the display in another web part”
  1. Chris Quick says:

    We’ve been using this to help with the sorting and tracking of tasks for applying updates to a public website. One team is responsible for the publication of content to the website while the other department is responsible for providing raw data from back-end systems to this department. Each department is officed in different buildings and are part of different divisions within the organization.

    We needed a way for each department to create and assign tasks for both teams to track. However, it became evident fairly early that the list was becoming cluttered with tasks and it was hard to determine which department was responsible for which task.

    We extended the standard tasks list by adding a new column with the list of departments (there actually ended up being five departments involved). This column is used to assign the department responsible for seeing the task to completion.

    We then created a connected web part that allows the departments to get a focused view of their tasks without the list of tasks not directly related to their sphere of influence. This has been very useful to each department because it has allowed all team members to keep up-to-date on all tasks, regardless of department. The site also allows them to filter the tasks to list only their departmental tasks for use in team meetings, etc.

    By using connected web-parts, all parties involved can quickly see the overall progress of all tasks while having the flexibility to work in the site as if only their department were involved. Both managers and team members enjoy this flexibility!

  2. Mark Miller says:

    Chris – Very nice usage. This gave me the thought that multiple teams can work on seperate lists/libraries but create dynamic views in either direction against the other team’s data on the aggregate page.

    You wouldn’t be limited to two teams, which means this could be a very fun and complex idea to hash out, data cross-referencing itself through the various connections.

    I need to stop thinking about it or my brain will explode…

  3. Adam Casey says:

    Got Students, who have many libraries depending on subjects, rather than navigating between them, i was hoping to use this method, althought I kind think of correct column headings, any suggestions?

  4. Adam Casey says:

    not kind, can not* :)

  5. Mark Miller says:

    Adam – Start by talking with the people who are using the lists/libraries. See how they filter for getting specific output. Use what you learn from your End User to develop the custom columns to be used for filtering on your aggregate page.

    How about giving me some examples. Name two libraries that should be able to ‘talk’ with each other. List the current column names in each library and let’s see what can be done.

    Regards,
    Mark

  6. David Kruger says:

    Sorry for the commercial interruption. I rarely post but feel like I should on this one. The connection functionality discussed here is great, but is much better when you can combine it with muti-field cross-site and cross site collection lookup, and create true parent child relationshiop between lists. Navigation can be direct from any list item element to any list item element from anywhere in a SharePoint instance to and list item or library in a SharePoint instance. You can re use or re-purpose data at will. just takes the right webparts.

  7. Mark Miller says:

    David – Your tool looks interesting. If you’d like to send me a scenario where your tool would be useful in this situation, I’ll consider posting it. It sounds as if this would also make a great screencast.

    I’ll send you my email address.

    Regards,
    Mark

  8. Iain Munro says:

    Evening

    Where is the demo?

    Iain

  9. Mark Miller says:

    Iain – Not sure… seems to be working fine for me. What browser are you using. This points to an embedded flash file.

    Mark

  10. Ollivier Timsit says:

    It works fine for me, but how to chain many WP ?is there any other solution than that :

    List1
    list1item1
    list1item2
    list1item3

    List2
    list1item1 | list2item1
    list1item1 | list2item2
    list1item1 | list2item3
    list1item2 | list2item1
    list1item2 | list2item2
    list1item2 | list2item3


    then, to send filter from list1 to list2 and to finish, filter from list2 to library. (imagine if you want more filters).
    Ollivier

  11. Liz says:

    Hello and thank you for this useful post (which by the way you’ll need IE to see, Firefox won’t show the demo).

    Problem for me in trying out this solution is that the Connections options on the ‘Edit Web Part’ drop-down menu are all greyed out and unavailable.

    Any idea how to enable them?

    Thanks once again!
    Liz

  12. Mark Miller says:

    Liz – I know this will sound simplistic, but do you have two web parts on the page and is there a common column between them that can be related?

    Mark

  13. Liz says:

    Mark,
    Yes, I have two web parts on the page and they do have a column containing the same information – though the column name is not the same.

    The first is ITS Service List and has a Title column. The second is ITS Sub-service List and it has two columns; ITS Service (which is a lookup to the first column), and Title.

    Would the lookup be causing a circular reference perhaps??

    Thanks for such a prompt response.

  14. Liz says:

    Sorry, read ‘which is a lookup to the first column’ as ‘which is a lookup to the first list’.

  15. Liz says:

    I’ve found the problem myself. I noticed that the icons for the 2 lists differed. Turns out that I had created one as a ‘custom list in datasheet view’, which inevitably doesn’t seem to work that way and I couldn’t simply turn that view off.

    I had to recreate the list as a plain custom list and then move my content across. It now works fine. Thanks again.

  16. Krystie says:

    Hi Mark,

    I cannot get the flash demo to play for me either. I have flash installed and can view other flash files though… Any chance you could upload it somewhere else? :)

  17. Krystie says:

    Hi Mark,
    I am an educational consultant for a school district in Australia. Many of the schools in my district would like to create a list in which they can enter and look up students’ academic results over the course of their studies at the particular school, year to year.

    When they enter results, they would like to:
    (1) Select the Year level/Class group (eg. Year 9) – from a drop-down list
    (2) Select the student – Based on the selection made in (1), a list of the students only in that class should appear in the drop-down list
    (3) Select the year – 2008, 2009, 2010 – simple drop-down list
    (4) Select the School Term (1,2, 3 or 4)
    (5) Select the subject area – Simple drop-down list
    (6) Enter the results obtained

    When teachers look up results, they want to:
    (1) Select the Year level/Class group (eg. Year 9) – from a drop-down list
    (2) Select the student – Based on the selection made in (1), a list of the students only in that class should appear in the drop-down list
    (3) Select the year – 2008, 2009, 2010 – simple drop-down list
    (4) Select the School Term (1,2, 3 or 4)
    (5) Select the subject area – Simple drop-down list
    (6) View the results obtained

    It is Steps 1 and 2 that I am desperate for help with. It doesn’t sound too tricky in theory, but I have spent hours and hours searching for a way and cannot figure it out! Your tutorial seemed like it might have the answer I was looking for, but now I cannot view it.

    If you have any ideas, I would greatly appreciate any advice you could offer.

  18. Mark Miller says:

    Krystie – Right now, I don’t have any other way to post these because of the way they are saved when creating them in Camtasia.

    I am looking into hosting services for screencasts and will post back when I get setup.

    Regards,
    Mark

  19. Mark Miller says:

    Krystie – I received your problem description after I posted my original comment. I don’t think you need anything special for this… just the filtering and sorting features within a basic list. I’m under the gun right now, but will try to post a solution next week.

    In the meantime, please make sure you have the latest version of Flash and, if possible, use an IE 6+ to view the demos.

    Regards,
    Mark

  20. Rene says:

    Hi, Krystie wrote:

    Hi Mark,

    I cannot get the flash demo to play for me either. I have flash installed and can view other flash files though… Any chance you could upload it somewhere else? ”

    When the screencast has finished playing it is stored in the Temp map on your Pc

  21. Mike says:

    I have two lists. One is a list of projects and it has a column that lists the roles needed for each project. The column is populated via a multiple choice checkbox, so typical data would be “Project Mgr; Architect; Engineer”. My second list contains employees who need additional project work. This list has a role column similar to the first, expect that it’s a single selection from the same selection, so typical data would be “Project Mgr” OR “Architect” OR “Engineer”. I’d like to be able to use the project list to filter the employee list (i.e. show me all employees who’s role matches any of the roles needed for a particular project.

    Does anyone know a way of doing this? I was able to do the reverse (show me all projects that need a role of Engineer), but I’m struggling with this part. Any suggestions would be appreciated.

  22. Mark Miller says:

    Mike – This can’t be done OOTB. You’ll need to do some coding. Maybe the other guys can give you some pointers.

    Mark

  23. Eskil says:

    Hi Mark,

    I notice that when you have finished the web part connection, no default value (radio button) is selected (at 02:56 in the screencast).

    Is it possible to specify a default selected value in the “Types of documents” web part? In case yes, how?

    Thanks and regards,
    Eskil

  24. Eskil – In the interface provided there is no way to set a default. However, you can manage the view in the web part that is being driven.

    When you insert the web part, choose to modify it and choose to edit the current view in configuration panel. That might give you what you are looking for.

    Regards,
    Mark

  25. Patrice says:

    Mark,

    Is there any way to allow users to select more than one option at a time? We want users to be able to filter News Announcements by “category” but we want them to be able to pick more than one category at a time, and remove the filter to show all news items. Would chaining make this possible? I tried a choice filter on the announcements Category column and enabled multiple selections, but it only passes the first value. In what situations or web parts does the “allow multiple selections” even work?

    Thanks,
    Patrice

  26. Patrice – Out of the box, no, connections don’t allow multiple choice. As you suggested, however, you can chain web parts together. Let me see if I can include this as an example in the dashboards demo on Tuesday. — Mark

  27. Greg says:

    Mark,
    This is an old post but who knows….
    I do have the same question as Patrice above regarding how to have a ‘multiple selection’ filtering.
    Have you come across a solution since this post?
    Thanks,
    Greg

  28. Jason says:

    Hi there,

    Is there a way to unfilter? I have webpart connection using a list of names to filter a custom list containing a column of those same names. However, once I’ve selected a name to filter, I’m unable to unfilter to show the entire list.

    I have tried using a custom list with a People and Groups column and creating a contact list and just list with the names in a column of text. I can make all the connections and filter fine, but unable to unfilter.

    Please advise.
    Thanks in advance everyone!

Trackbacks

Check out what others are saying about this post...
  1. [...] Use a web part to filter the display in another web part [...]

  2. [...] Andrea – I have not see any documentation on a limitation, but that doesn’t mean there isn’t any. Let’s see if someone has any definitive answer on this one. For those not familiar with the Connection functionality of web parts, check out the previous post on Use a Web Part to Filter a Display in Another Web Part. [...]




Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!