1

I have a custom list with multiple fields with data of employees. One of the fields is the employee section. Currently to see employees of a specific section I created 1.A page that has the list of sections with a hyperlink, 2.A page for each section with a web part that has a custom view to show employees of that specific section only.

Now I remember in a dynamic web site using ASP or PHP you could do all this with two pages. One lists the departments and the other one builds on the fly the page you are requesting.

Is this possible using SharePoint where one page will have the section while the second page will have a custom view criteria (Show the items only when the following is true) where column "X" will have the filter of the criteria instead of building a page for each and every section.

Thanks

1 Answer 1

0

You can use the query parameters FilterField and FilterValue to encode the filtering behavior you want into the link URL. And in fact, you can use multiple fields and values, so even if you only have one filter you want to apply, the query params would actually be FilterField1 and FilterValue1.

So you could have your one page with all the links, and then one page with just a list view web part on it, which you could set up with a view to show whatever fields you want, but no filters applied, and then set up your link URLs like

/sites/MySite/SitePages/CustomPage.aspx?FilterField1=Section&FilterValue1=SomeSection

/sites/MySite/SitePages/CustomPage.aspx?FilterField1=Section&FilterValue1=OtherSection

Then if you want to filter on other fields as well you can use FilterField2/FilterValue2 etc.

Here's another question/answer about this subject.

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.