Simplified Cascading for Multiple Choice Drop-Down Filters - SharePoint Zen - ROXORITY ™ Sensational SharePoint Solutions
User Voices
(Loading...)
Our blog on SharePoint add-ons and solutions development
« Ad-hoc View Customization in the User Profiles Web Part | Main | Here's a free Web Part to show just the Current User profile »
Saturday
Jul312010

Simplified Cascading for Multiple Choice Drop-Down Filters

FilterZen, the ultimate Filter Web Part for SharePoint, has had cascading drop-down filters for a while but we have now extended our offering.

What are drop-down filters?

FilterZen lets you combine filters of various types to then target a variety of data presentation and other Web Parts. Among simpler filter types such as text filters (providing a simple text box) or date pickers, we also offer a range of drop-down filters: these are Choice Filters (you pre-define the pickable choices), SQL Data Filters (choices are loaded from any ADO-compatible data source), BDC Lookup Filters (choices are loaded from any BDC application), User Filters (choices are simply a pre-defined selection of existing user accounts) and List Lookup Filters (choices are loaded from any SharePoint List inside the farm).

What is meant by "Cascading" them?

Since 2009, once a FilterZen Web Part had at least two drop-down filters and was connected to a CAML-capable consumer Web Part, such as List Views, BDC Lists or List-bound Data Views, you could tick (in the Interactive Filters section) a check-box option labeled:

Cascading pre-filtering: limit pickable choices of all drop-down filters to existing values still available after filtering.

This simply means that any end-user selection in any of your drop-down filters immediately reduced in all other drop-down filters the total set of possible selections to a sub-set that would "still make sense" given the initial end-user selection. In other words, once a value foo is selected in Filter A, if there are no List items containing both foo and bar, then bar would no longer be available for selection in Filter B.

So you can "Cascade based on the connected List". Now what's new?

Simple. Cascading based on List data covers maybe 90% of use cases, but sometimes this is not what's required at all. One user for instance connected a Filter Web Part to an Excel Web Access (EWA) Web Part and wanted to provide end-users with a bi-level filter selection (somewhat akin to a simplified faceted metadata navigation) resembling the following:

In an upcoming release, we will simply let you define such ontological hierarchies via SharePoint 2010's new built-in Managed Metadata & Taxonomy Management features and then let you reflect these in your filters. For now, this was to work on SharePoint 2007 and the semantics of little complexity, it had to be definable right inside FilterZen without too much hassle. So for now we came up with a new simply syntax that lets you connect two Choice Filters (or rather, any drop-down filter and a Choice filter) to provide cascading behavior outside any sort of List context. The following screenshot below demonstrates just how easily you can achieve the inter-dependent filter value selection sets shown in the above screenshot:

Reader Comments (7)

I have used two Choice filters to filter my list and performed the steps as mentined above. But after selecting the filter values, no items are shown in my list. If I use lookup filters for the same, I am able to filter my list. What configuration I missed here.

January 19, 2012 at 22:36 | Unregistered CommenterSrini

Sorry for the delay! If this is still an issue, please email us an export of your FilterZen Web Part (via its web part menu / Export option).

January 24, 2012 at 14:17 | Registered CommenterROXORITY

I have a list of over a thousand choices for one data view. Since you can only put 1000 in a choice filter, I was thinking about trying to break up my choices alphabetically (choice filter 1 = A-M and choice filter 2 = N-Z). And then I set up two parameters in the data view and connected them seperately to the filters. If I select a name in the A-M filter, data shows up in the data view, but when I click on a name in the N-Z filter, nothing shows up. What are my options? Cheers!

March 9, 2012 at 3:03 | Unregistered CommenterCaleb

How can I cascade filter values from other filter types?

Example, I have two SQL filters

1) User chooses a value for first SQL filter (Category)
2) Second filter is "Select Choices from Table where Category = {Value from Filter1}

July 18, 2012 at 23:22 | Unregistered CommenterKJ

KJ, the cascading feature should be independent of drop-down filter type, ie. you should be able to mix SQL Data Lookup, List Lookup, Choice filters. Email us if this is causing you issues.

August 28, 2012 at 10:35 | Registered CommenterROXORITY

Maybe I was doing it wrong, but the problem was figuring out how to carry over a value from one SQL part to another part. Your example above using [[Category: Animals]] didn't seem to carry over to a SQL filter. My SQL part was called BatchID, the column name as VOUCHERID.. I tried [[BatchID: VOUCHERID]] and every combination I could think of and no success.

So instead I turned on the option to put parameters in the URL, and in my second filter I used the URL convention ...where BACHNUMB = '{$BatchID$}'... (putting the URL Param inside {$URLPARAM$}.

So selection of the first filter puts the filter value in the URL, the 2nd filter uses the value from the URL. Was this the right approach?

August 28, 2012 at 23:20 | Unregistered CommenterKJ

Oh my bad... the above reply wasn't actually fully applicable to this specific use-case -- more of a general remark on our cascading-based-on-List-data even with mixed drop-down filters.

Well, the short version of the situation is -- this feature is unique to Choice Filters at present and SQL Filters have no such "skill" as of yet.

August 29, 2012 at 6:32 | Registered CommenterROXORITY
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.