Search This Blog

Friday, September 11, 2015

How to Filter DataView WebPart (DVWP) from Query String

Assuming you already have a working data view webpart:

  1. Open SharePoint designer and the page that the data view web part exists on

  2. From the Options tab of the Data View Tools section in the ribbon, select Parameters 

  3. Create a new parameter of type Query String - specifiy the parameter name, the query string variable name (what its called in the URL), and the default value (for when no value is supplied)


  4. From the Options tab of the Data View Tools section in the ribbon, select Filters

  5. Set up the filter to use your parameter (QueryParameter will be the parameter name you supplied)

  6. If you have problems with the steps above, I'll add that I always start with an empty data view web part and then manually add the data source and columns to it through the menus and XSLT. I find that this route tends causes me less trouble than adding a data view web part with the data source directly attached

No comments:

Post a Comment