0

I'm using SharePoint 2013. I want to automatically filter a discussion board view based on which category [tile] was clicked. Here's the view my users are starting from:

SharePoint Discussion Board Categories (Tile View)

When you click on a tile, you see a filtered view of the discussion board. I want to create a custom view and have it displayed based on category data in the URL. In this example, 'CA' is the title of the category. I can manually filter the view by setting that value equal to 'CA,' but I want to create one view that pulls the category value (from the URL) dynamically, and automatically.

SP Discussion Board Category URL

Any help you can provide is appreciated! I've never done anything with JavaScript, jQuery, etc. but I suspect some form of one or the other needs to be used to "get" the category value from the URL. That value (as a variable) would then need to be "put" into the filter field. I have no idea how to do this! Thank you. :)

1

Why dont you try JSlink/Client side rendering(CSR) concept to achieve your functionality.

Get the query string value using the following code

var itemId = GetUrlKeyValue('ID'); //get Item Id from query string

Write a function and override the view template which will achieve your functionality.

Refer the below links for more idea bout CSR,

http://www.codeproject.com/Articles/620110/SharePoint-Client-Side-Rendering-List-Views https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a

0

If you have a fixed set of categories and category links are not generated automaticly I would suggest to:

  1. Just go to you list that you want to filter
  2. Make sure you have the column that you want to filter on in your view
  3. Filter the list by clicking on the column and selecting the correct value
  4. Copy the URL and use it in your category tiles list

Other option (could be helpful if the category tiles are generated automatically) is to use the query string filter webpart. You place this webpart on the page which contains your list. Configure it look for the query string parameter and connect it to your list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.