locked
Display large list data based on the multiple selection filter RRS feed

  • Question

  • ​I have a large list with approximately 1 lakh records. The list view threshold view is set to 5000. I would like to create a view which should allow multiple selection filter on a column which is indexed.

    I tried to use SharePoint List Filter webpart with SharePoint List view webpart. I have set the SharePoint List Filter webpart to allow multiple selections. But, when I select multiple options in SharePoint List Filter webpart, it is getting filtered only with the first value.

    I tried to use a datasheet view with custom filter. But, it is allowing to select upto three options using OR condition.

    I would like to display the data of this large list based on the multiple selection filter. Please let me know your views on how to achieve this. Thanks.

    Monday, July 21, 2014 11:05 AM

Answers

  • Do you have access to SharePoint Designer?

    If so, there's a way for you to have a set number of filter web parts that can each apply to the list view with an OR condition. Because it's a large list, there's a good chance the filtering won't work correctly--OR filters are notorious for querying the entire list and running into the list view threshold--but it may be worth a shot.

    Let's say you wanted users to be able to filter on three different values, so that any items in the list that matched any of the values would be displayed.

    First, add three filter web parts to the page (choice, text, or SharePoint list filter web parts should work). Normally the filter web parts simply connect to columns for direct filtering, but you can also connect them to "parameters" of a list view web part, which can behave differently. We're going to add parameters to the list view web part.

    Next, open the page in SharePoint Designer and click into the list view web part. Click the "Parameters" button on the ribbon. Add three parameters called Filter1, Filter2, and Filter3.

    Now click the Filtering button on the ribbon. Add filters to the web part so that the desired field equals Filter1 OR the desired field equals Filter2 OR the desired field equals Filter3. Save the page.

    Now you just need to connect the web parts. When you make the connection, for the Connection Type, instead of choosing "Get filter values from" choose "Get parameters from". Now you can hook the web part up to one of your parameters: Filter1, Filter2, or Filter3.

    It's not quite the same as what you were originally looking for, since you can't select an unlimited number of filter values--only one value for each filter web part--but it does let you filter with an OR condition on multiple selections at a time.

    • Marked as answer by JasonGuo Friday, August 1, 2014 9:45 AM
    Thursday, July 24, 2014 1:59 PM

All replies

  • You could try adding the "Filter Actions" web part to the page along with the other filter web part(s). Having this web part on the page delays the filtering action of all other filter web parts until you manually click the "Apply Filter" button.

    Another option to consider would be activating the metadata navigation feature on the site and then applying it to the list.

    Monday, July 21, 2014 4:03 PM
  • Thank you. I have tried using "Choice Filters" and "Filter Actions" web part. The "Filter Action" web part is delaying the filter action of all other filter web parts until I click the "Apply Filter" button. Also the meta data navigation and filtering is already active. But, the issue is when I select two options in the choice filter, it is filtering only based on the first value.
    • Edited by Balaji_ Wednesday, July 23, 2014 3:18 PM typo
    Wednesday, July 23, 2014 3:18 PM
  • Ah, the multiple selection option on the SharePoint List Filter option has a little caveat that indicates it won't work for filtering on certain web parts. It'll still let you connect to them, but when connecting to a list view web part only the first selected value is sent.

    Here's the relevant documentation: http://office.microsoft.com/en-us/sharepoint-server-help/connect-a-filter-web-part-to-a-list-view-web-part-HA010250989.aspx

    and the relevant quote:

    To enable the clearing of a filter so that users can see all the values in the List View Web Part, select Allow Multiple selections. In this case, the Select Filter Value(s) dialog box displays check boxes, rather than radio buttons.

    Note   You cannot use this feature to display the filtered results of two or more selections, because The List View Web Part does not support multiple selections. If a user chooses multiple selections, only the first selection is used.


    Wednesday, July 23, 2014 6:50 PM
  • Thank you. I want the user to be able to select multiple options and based on the selection I need to display the list.

    Considering the below, please let me know the best way to achieve this

    1. This is a large list with approx 1 lakh records with index created

    2. SharePoint server access is not available, only have access to use client object model

    Thursday, July 24, 2014 11:07 AM
  • Do you have access to SharePoint Designer?

    If so, there's a way for you to have a set number of filter web parts that can each apply to the list view with an OR condition. Because it's a large list, there's a good chance the filtering won't work correctly--OR filters are notorious for querying the entire list and running into the list view threshold--but it may be worth a shot.

    Let's say you wanted users to be able to filter on three different values, so that any items in the list that matched any of the values would be displayed.

    First, add three filter web parts to the page (choice, text, or SharePoint list filter web parts should work). Normally the filter web parts simply connect to columns for direct filtering, but you can also connect them to "parameters" of a list view web part, which can behave differently. We're going to add parameters to the list view web part.

    Next, open the page in SharePoint Designer and click into the list view web part. Click the "Parameters" button on the ribbon. Add three parameters called Filter1, Filter2, and Filter3.

    Now click the Filtering button on the ribbon. Add filters to the web part so that the desired field equals Filter1 OR the desired field equals Filter2 OR the desired field equals Filter3. Save the page.

    Now you just need to connect the web parts. When you make the connection, for the Connection Type, instead of choosing "Get filter values from" choose "Get parameters from". Now you can hook the web part up to one of your parameters: Filter1, Filter2, or Filter3.

    It's not quite the same as what you were originally looking for, since you can't select an unlimited number of filter values--only one value for each filter web part--but it does let you filter with an OR condition on multiple selections at a time.

    • Marked as answer by JasonGuo Friday, August 1, 2014 9:45 AM
    Thursday, July 24, 2014 1:59 PM