0

I have a document library, and the library contains multiple folders and files within each of the folders. I have a unique column called "Header" and this refers to the type of file that appears. The custom view shows all files without folders organized by Headers.

Currently when the page is viewed, it has a web part that opens the library organized by all the headers and allows you to expand each one.

I'd also like the option for a user to click a link that only refers to a particular header however.

For examples, headers are

Sales, Billing, Service

Is there a way to supply an argument with the link that will trigger something like this? E.g. /SitePages/myLibrary.aspx?view=Service or something along those lines?

I know in the view settings, I can specify filter options to accomplish this, but I also don't want to create a custom view for each folder (header) I have as there are quite a few and could change over time. How do I trigger these filters via the HTTP query string like suggested above?

2 Answers 2

0

So, you just want a url that results in a filtered view of a list/library? If you manually filter the list (using the filter capabilities that are available by clicking on the column header, not using a custom view), you'll note that the filter changes the url. So the URL will be something like:

.../editform.aspx?fieldfield1=Header&filtervalue1=Sales

So, just manually filter the list/library, get the URL with the filter settings, and change as needed.

2
  • Is there a reason that it is not as simple as above? What I mean, if I do that, and take the link, its got some other stuff in the link that is encrypted. Why wouldnt just passing FF1 and FV1 variables work by themselveS?
    – friedfishy
    Commented Sep 28, 2015 at 12:49
  • Can you post the rest of the querystring? Nothing is encrypted, though some parts are likely encoded.
    – Mike2500
    Commented Sep 28, 2015 at 13:17
0

Have you considered using a filter web part? You could create a new web part page, add a SharePoint List Filter that is set to look up values from your library's header field, then connect the filter to your library view (step-by-step). Alternatively, you could use a Query String (URL) Filter to feed a value from the URL string to the library's header field.

Your Answer

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

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