1

I am working on a sharepoint enterprise farm 2013. and i have a document library with the defualt built-in list view which can be accessed using this url http://servername/sitename/listname/Forms/AllItems.aspx. now inside the document library i have defined some custom site columns, as follow:-

  1. document type. of type drop-down
  2. document description. of type multiple line of text.
  3. etc...

now my question is if i can filter the list view by applying the filter parameters to the list view url. so if i want the documents which have type= "General", can i do something as follow:-

http://servername/sitename/listname/Forms/AllItems.aspx?documenttype=general

now i tried this, but it will return the list view with all the documents, so seems it ignored this part ?documenttype=general.. so my question is can i have the ability to apply filter parameters to the list view url?

2 Answers 2

1

Yes you can in a different format as below

http://servername/sitename/Lists/ListName/Forms/AllItems.aspx?FilterField1=DocumentType&FilterValue1=General

Similarly if you want to add more criteria just add &FitlerField2=...

8
  • 1
    Your format is wrong.. try the one I provided.. Oct 19, 2017 at 15:04
  • now i tried your format, but i got this error "Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Microsoft SharePoint Foundation-compatible HTML editor such as Microsoft SharePoint Designer. If the problem persists, contact your Web server administrator. "
    – John John
    Oct 19, 2017 at 15:05
  • 1
    Make sure the field name DocumentType is the proper name Oct 19, 2017 at 15:06
  • now inside the list view page i use to have content editor web part, now when i remove it i can filter the list correctly...
    – John John
    Oct 19, 2017 at 15:07
  • 1
    Make the content editor Webpart the second Webpart of the page Oct 19, 2017 at 15:08
1

You can use the QueryString Filter web part to filter the current view based on the query string parameter!

enter image description here

The syntax for Query string parameter

http://servername/sitename/listname/Forms/AllItems.aspx?<Name>=<Val>

For multiple Query string parameters

http://servername/sitename/listname/Forms/AllItems.aspx?<Name>=<Val>&<Name>=<Val>

Check the details at

3
  • ok thanks for the reply. now i tried this query http://servername/sitename/listname/Forms/AllItems.aspx?<Name>=<Val>&<Name>=<Val> where i was able to filter the list view accordingly. but if i have documents inside folders then seems the list view filter will not show the documents which are added inside the folders.. for example i type this url http://servername/sitename/Lists/ListName/Forms/AllItems.asp‌​x?FilterField1=Docum‌​entType&FilterValue1‌​=General
    – John John
    Oct 19, 2017 at 15:21
  • where i get all the documents which are added directly to the document library and have their document type= general.. but for the documents which were added inside folders they are not going to be shown, even if their document type = general.. so do you have any idea if i can fix this problem ?
    – John John
    Oct 19, 2017 at 15:31
  • I got your point, you need to get the documents inside folders that match the filter criteria! unfortunately, the filter criteria don't apply to the documents inside the folder! it's not working like the search it just a filter! and the available solution is to modify your view to show all files but I think this does not match your requirements! Oct 19, 2017 at 17:21

Your Answer

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

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