Filtering XSLT List view web part with Text filter Web parts

Filtering XSLT List view web part with Text filter Web parts Sameer Mohammed

Applies to SharePoint 2013. Out of the several different filters, webparts let’s try using a Text filter webpart
On a new non-webpart page created form designer add a dataview webpart and select a list

Select a Text Filter webpart

Change the filter name and Title name to something simple

We are going to create a filter on Lastname, the dataview webpart will display all the contact that contains this last name. High-level strategy to achieve this is to create a last name parameter in DataView webpart, apply filtering based on the last name in the XSLT listview webpart and finally pass the value of this parameter from the list filter webpart. Let’s start with creating a parameter in the xsltlistview webpart,

Applied filter using this parameter

This will add the following CAML query to the Query section, before applying the filter it was only

Now let’s connect xslt listview webpart with text filter. With the cursor in Contact List XSLTListview webpart click on ‘Add Connection’ and in the wizard select “Get Parameters From”, this basically means we are going to get the value of a Contact List parameter, the name of the parameter will be specified later in the wizard.

Hit on Next

Hit Next, select the text filter and select the action as send a value to,

Hit on Next to map the parameter of ContactsList (specified in the rt side of below image) to the name of the filter which is “Last Name” also( specified in left side).

finally hit on next and Finish

This basically adds the below spwebpartconnection to the page specifying the connection between the two webparts

Preview the page, type in the last name filter and you will see the values refresh in the XSLTListView in the bottom.

Check out my below posts on DataView Webpart, leave me a comment if you find them useful