{"id":2947,"date":"2013-07-15T08:37:45","date_gmt":"2013-07-15T08:37:45","guid":{"rendered":"http:\/\/jellywp.com\/theme\/entron\/demo5\/?p=2947"},"modified":"2013-07-15T08:37:45","modified_gmt":"2013-07-15T08:37:45","slug":"filtering-xslt-list-view-web-part-with-text-filter-web-parts","status":"publish","type":"post","link":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/filtering-xslt-list-view-web-part-with-text-filter-web-parts\/","title":{"rendered":"Filtering XSLT List view web part with Text filter Web parts"},"content":{"rendered":"<p>Applies to SharePoint 2013. Out of the several different filters, webparts let\u2019s try using a Text filter webpart<br \/>\nOn a new non-webpart page created form designer add a dataview webpart and select a list<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2016\/12\/1-1.png\" alt=\"\" width=\"617\" height=\"522\" class=\"alignnone size-full wp-image-3543\" \/><\/p>\n<p>Select a Text Filter webpart<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2016\/12\/2-1.png\" alt=\"\" width=\"326\" height=\"411\" class=\"alignnone size-full wp-image-3544\" \/><\/p>\n<p>Change the filter name and Title name to something simple<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/3.png\" alt=\"\" width=\"298\" height=\"39\" class=\"alignnone size-full wp-image-3546\" \/><\/p>\n<p>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&#8217;s start with creating a parameter in the xsltlistview webpart,<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/4.png\" alt=\"\" width=\"567\" height=\"419\" class=\"alignnone size-full wp-image-3547\" \/><\/p>\n<p>Applied filter using this parameter<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/5.png\" alt=\"\" width=\"457\" height=\"342\" class=\"alignnone size-full wp-image-3549\" \/><\/p>\n<p>This will add the following CAML query to the Query section, before applying the filter it was only <Query\/><br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/6.png\" alt=\"\" width=\"494\" height=\"169\" class=\"alignnone size-full wp-image-3550\" \/><\/p>\n<p>Now let&#8217;s connect xslt listview webpart with text filter. With the cursor in Contact List XSLTListview webpart click on \u2018Add Connection\u2019 and in the wizard select \u201cGet Parameters From\u201d, 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.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/7.png\" alt=\"\" width=\"506\" height=\"474\" class=\"alignnone size-full wp-image-3551\" \/><\/p>\n<p>Hit on Next<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/8.png\" alt=\"\" width=\"464\" height=\"359\" class=\"alignnone size-full wp-image-3552\" \/><\/p>\n<p>Hit Next, select the text filter and select the action as send a value to,<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/9.png\" alt=\"\" width=\"464\" height=\"360\" class=\"alignnone size-full wp-image-3553\" \/><\/p>\n<p>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 \u201cLast Name\u201d also( specified in left side).<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/10.png\" alt=\"\" width=\"464\" height=\"357\" class=\"alignnone size-full wp-image-3554\" \/><\/p>\n<p>finally hit on next and Finish<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/11.png\" alt=\"\" width=\"464\" height=\"359\" class=\"alignnone size-full wp-image-3555\" \/><\/p>\n<p>This basically adds the below spwebpartconnection to the page specifying the connection between the two webparts<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/12.png\" alt=\"\" width=\"628\" height=\"140\" class=\"alignnone size-full wp-image-3556\" \/><\/p>\n<p>Preview the page, type in the last name filter and you will see the values refresh in the XSLTListView in the bottom.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-content\/uploads\/2013\/07\/13.png\" alt=\"\" width=\"381\" height=\"343\" class=\"alignnone size-full wp-image-3557\" \/><\/p>\n<p>Check out my below posts on DataView Webpart, leave me a comment if you find them useful  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Applies to SharePoint 2013. Out of the several different filters, webparts let\u2019s 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 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts\/2947"}],"collection":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/comments?post=2947"}],"version-history":[{"count":0,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/posts\/2947\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/media?parent=2947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/categories?post=2947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teamwp.mydevfactory.com\/abhisek-saha\/aqltech\/wp-json\/wp\/v2\/tags?post=2947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}