Applies to SharePoint 2013
Out of the several different filter 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 contain this last name. High level strategry to achive this is to create a lastname parameter in DataView webpart, apply filtering based on lastname in the XSLT listview webpart and finally pass the value of this parameter from the list filter webpart. Lets 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 <Query/>
Now lets connect xslt listview webpart with text filter. With 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 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
Nice post.
ReplyDeleteFor me it feels like SharePoint Designer 2013 has taken a step back compared to 2010.
Toolbar buttons grayed out when they shouldn't be.
Control breadcrumb not always working.
Tool bar tabs disappear once used, never to return (eg congiguring XSLTListViewWebPart).
You'd think the product would be mature by now, but it just gets worse!
I'm having trouble using XSLTListViewWebPart filtering from a query parameter. It works when the BindingParamater has a default value, but not otherwise.
Do you have any hints for me?
Thanks
Martin
PS I have June CU of SP2013 Server and 15.0.4454.1000 SPD 2103 x64
I've just come across another post where the user points out it works with the team site template, but not the blank template.
ReplyDeleteI'm using the blank template with these features enabled:
Enable-SPFeature -identity "WebPartAdderGroups" -URL $url
Enable-SPFeature -identity "DocumentSet" -URL $url
Enable-SPFeature -identity "BizAppsSiteTemplates" -URL $url
performed as it is as mentioned above but getting no result, empty library without entering any text in it.
ReplyDeleteplease tell me a way around to get rid of this problem..!
ReplyDeleteI attempted this but for some reason, the changes in SPD do not update the site, so whenever I save and refresh I lose the changes. Any suggestions?
ReplyDeleteHi
ReplyDeleteWhen I insert the textfilter webpart it removes the Dataview webpart, are these webparts on the same page?