Apply Filters in Query String URL in SharePoint 2013 For Multi Choice Field

Introduction

This article explains how to apply filters in a query string URL in SharePoint 2013 for a multi-choice field.

Prerequisites

Ensure you have a SharePoint site.

Scenario

Dynamically add list items in quick launch and apply filters.

Use the following procedure.

  1. Create a custom list called called Test.

    Create a custom list
     
  2. Add a field called “Skills” and type to be “Multi choice filed”.

    Multi choice filed
     
  3. Now add the data to the list.

    list
     
  4. Now comes the filter criteria.

    Format Yousiteurl/Lists/listname/ViewName.aspx? FilterField1=FieldName& FilterValue1=ValueToBeShown&FilterOp1=Contains

    Example

    http://YourSiteURL/Lists/Test/AllItems.aspx?FilterField1=Skills&FilterValue1=C%23&FilterOp1=Contains

    &FilterOp1=Contains is important and the URL string is case sensitive
  5. Default we only filter on column (equal =).
     
  6. Now we can filter (like query) data Equal than with structure: FilterField1=ID&FilterValue1=1&FilterOp1=Eq
     
  7. Likewise you can replace Contains with Eq, Geq, Neq, Lt and so on.
     
  8. That's it. Now let's test the list by adding the preceding URL.

    Testing
     
  9. Now let's filter the Skills by C#.
     
  10. Append the URL in the browser:

    http://YourSiteURL/Lists/Test/AllItems.aspx?FilterField1=Skills&FilterValue1=C%23&FilterOp1=Contains

    Testing

    That's it.

Summary

Thus in this article you saw how to apply filters in a query string URL in SharePoint 2013 for a multi-choice field.