1

enter image description here

I am working on SharePoint 2010, I have a custom list with columns Start date , End date, Created by, Approval Status. I have created a page where I am looking to filter the list and show the result depending on the approval status which is a column in custom list as shown in figure . Can some one help me out on how to approach for this.

1 Answer 1

2

I just did something similar for SharePoint 2013 but I'm pretty sure this works for 2010 as well.

You can pass in special query string parameters to your views on a list, namely FilterFieldN, FilterValueN, and FilterOpN (where N is a number between 1 and 10).

Example: http://example.com/lists/Tasks/AllItems.aspx?FilterField1=Title&FilterValue1=your_filter_value&FilterOp1=Contains should return all items from the Task list where Title contains "your_filter_value".

You can string up to 10 of these together on a given request.

What you can do is use your jQuery in a Content Editor Web Part that will build the URL containing the filter values (like the example above) and then redirect them to that page/view.

The advantage of this approach is it is straight forward, non-intrusive, and leverages functionality SharePoint already has built-in.

3
  • hi mcgrath the link you have provided is not working can you provide with alternate link Thanks. Commented Apr 8, 2015 at 20:54
  • The link is just an example :) Commented Apr 8, 2015 at 20:58
  • Apreciate if you could provide any snippet for the same ...Thanks Commented Apr 8, 2015 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.