Using filtering in the DataviewWebPart

As a result of the great interaction of the SharePoint community on twitter, I created this blog entry. 140 characters are definitely not enough to ask my questions, and Stump The panel doesn’t allow screenshot (I think). The content I provide is fictive, but the setup is real J. Please note, that the screenshots are from the test environment, and I blurred some thing due to confidentiality.

My current setup. We’re working with MOSS 2007. There is a site collection with a root site, let’s call it rootsite. Under the rootsite, there are several subsites, let’s call them subsite1, subsite2, ….
The members of subsites will only have access to their subsite. We can say that the subsite=registrant (so metadata hereunder)
In the root site I have a list. Let’s cal this list registrations. This list has several columns (metadata) Registration date,
Registrant, visible4all, material, unit,…

  • Registration deadline (date)
  • Registrant (lookup to a list called registrants)
  • visible4all (Yes/no)
  • material (single line of text)
  • unit (single line of text)
  • ,…

What would I like to have.

On a subsite, I would like to have a page with a view on the registrations list in the rootsite. The filter should be : Show items where (registrant=xxx or visible4all=Yes)
I created a dataviewwebpart to get that data. This will give me a list with all the registrations for that registrant. (I added the filter in the DVWP in the common dataview tasks) In this list I would like to use some extra filtering. For instance, I would like to filter on material, and would like to be able to filter even more , for instance on unit. (so the existing filter of the DVWP would be filtered on material, and then on that filtered data I would like to filter a unit) When I want to use the filter possibilities in the DVWP I click on DV properties (in SharePoint designer) and select Filter

This gives me a lousy implementation of the filter possibilities (click on filter, then select a filter). But entries appear multiple times in the dropdown list of that filter (for instance, when material wood is used in multiple entries in that list, it would appear multiple times in the drop down box). This results in a highly user-unfriendly way to filter data.

I installed the instantfilter from Jaap Vossers. I thought this would be a great solution, but the users say they don’t know the filter values by heart, hence they can’t use a system like this. They would really like to pick something from a dropdown box or something.

So, the actual question:

What possibilities do I have to setup a decent filter in the DVWP? A decent filter system would be something that you have by default on a document library or a list. Other solutions are also welcome. (must say, I rather new to XSLT and Jquery, but I’m a good searcher and am aware of the CTRL-C/CTRL-V keys of my keyboard J, and until now, I most questions I received coud be solved with other things than Jquery and or “copy-pastable Jquery” stuff ….

 

Suggestions are welcome in the comments, but if you need some more rich text, you can email me at . When you email me, I will do my outmost best to make an overview and create a blog post with the answers.

As a result of the great interaction of the SharePoint community on twitter, I created this blog entry. 140 characters are definitely not enough to ask my questions, and Stump The panel doesn’t allow screenshot (I think). The content I provide is fictive, but the setup is real J. Please note, that the screenshots are from the test environment, and I blurred some thing due to confidentiality.

My current setup. We’re working with MOSS 2007. There is a site collection with a root site, let’s call it rootsite. Under the rootsite, there are several subsites, let’s call them subsite1, subsite2, ….
The members of subsites will only have access to their subsite. We can say that the subsite=registrant (so metadata hereunder)
In the root site I have a list. Let’s cal this list registrations. This list has several columns (metadata) Registration date,
Registrant, visible4all, material, unit,…

  • Registration deadline (date)
  • Registrant (lookup to a list called registrants)
  • visible4all (Yes/no)
  • material (single line of text)
  • unit (single line of text)
  • ,…

What would I like to have.

On a subsite, I would like to have a page with a view on the registrations list in the rootsite. The filter should be : Show items where (registrant=xxx or visible4all=Yes)
I created a dataviewwebpart to get that data. This will give me a list with all the registrations for that registrant. (I added the filter in the DVWP in the common dataview tasks) In this list I would like to use some extra filtering. For instance, I would like to filter on material, and would like to be able to filter even more , for instance on unit. (so the existing filter of the DVWP would be filtered on material, and then on that filtered data I would like to filter a unit) When I want to use the filter possibilities in the DVWP I click on DV properties (in SharePoint designer) and select Filter

This gives me a lousy implementation of the filter possibilities (click on filter, then select a filter). But entries appear multiple times in the dropdown list of that filter (for instance, when material wood is used in multiple entries in that list, it would appear multiple times in the drop down box). This results in a highly user-unfriendly way to filter data.

I installed the instantfilter from Jaap Vossers. I thought this would be a great solution, but the users say they don’t know the filter values by heart, hence they can’t use a system like this. They would really like to pick something from a dropdown box or something.

So, the actual question:

What possibilities do I have to setup a decent filter in the DVWP? A decent filter system would be something that you have by default on a document library or a list. Other solutions are also welcome. (must say, I rather new to XSLT and Jquery, but I’m a good searcher and am awarae of the CTRL-C/CTRL-V keys of my keyboard J, and until now, I most questions I received coud be solved with other things than Jquery and or “copy-pastable Jquery” stuff ….

 

Suggestions are welcome in the comments, but if you need some more rich text, you can email me at . When you email me, I will do my outmost best to make an overview and create a blog post with the answers.

About Patrick Sledz

Patrick works as a consultant. He assists organizations to deliver SharePoint business value and create the awareness in these organizations that only a strong technical team is not sufficient to deliver this added value.

Tagged , . Bookmark the permalink.