Here’s a neat trick I figured out the other day. It didn’t actually solve my problem, but I figured it was worth documenting in case it comes in handy in the future. My goal was to add filter parameters to a URL so that it would automatically filter for specific elements.
This sort of technique could be used to point users or a page viewer webpart from a project workspace back to a centralized document repository, the likes of which I described in this post.
So first off, we need the URL of the list. Since I have the Contoso demo environment open, I’ll just use the sample report library in the BI Center.
Now let’s filter on all items where Modified By = Marc Soester. We need to identify how the system is referring to the Modified By field. To do this, click on the Library tab, and select the Library Settings option. Click on the Modified By field in the middle of the page.
That will yield a page that looks like this:
Take a look at the URL:
That last bit is what we’re looking for. Internally, SharePoint refers to the Modified By field as the Editor field.
So now we take the original URL and add the following string:
?&FilterField1=Editor&FilterValue1=Marc%20Soester …to yield the following URL:
Click on that, and you get a filtered list:
Want to filter on two fields? Use the following syntax:
…which will filter on all Visio Drawings (VDW) created by the System Account.