0

I am having difficulty getting filters to stick on my XSLTListViewWebPart (XLV) using Sharepoint Designer 2010. I am working on a single site collection that contains two sub-sites, a Document Center with one document library, and a team site.

I have a set of documents in the library, opened the view for these in SPD and exported the XLV to a web part file. I checked out a site page in the team site using SDP, opened in advanced mode, and imported the previous web part into a web part zone. Using the SPD List View Tools, I filtered the XLV on some text in the Title column, and saw the results displayed in the Design view as expected. But when I save the page, the rendered view in a browser shows the entire listing on that page instead of the filtered results. And when I re-open that page in SPD, the web part reverts back to the entire list as well. Inspection of the HTML shows that the entire code block containing the filter parameters is no longer there.

When I replicate the same steps by creating a new site page within the same document site, the page edits are saved and the XLV is rendered correctly. Does anyone know why this happens across different sites? I know there are other ways to display the data, such as CQWP and Data Views, but I need to keep the same UI elements that the list view normally provides.

2
  • Try with edit page in SharePoint site. Edit XLV webpart property.Click on "Edit the current view" link from List Views section. Filter what you want in view. Save it and check it applied or not. Apr 11 '16 at 5:51
  • I can't believe the solution was right under my nose the whole time! It's funny...out of all pages I've searched on to resolve this, not one has even mentioned this feature before. Thanks Viraj.
    – Keith
    Apr 11 '16 at 13:58
1

The answer was simple. Just edit the XLV on that page as you would for any list view. Open the page for editing, edit the web part, under the List Views header, click on "Edit the current view". Simply edit the Filter section as needed. If you are using managed metadata in the fields you want to filter on, you must match the text exactly, since it will not let you match by contains, begins with, etc.

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.