I have a Data Form Web Part (DFWP) in SP2010 and need to filter one of the columns ("Department") on a value using the querystring. How do you do this?

1 Answer 1


Open the web part page that contains the web part in question.

In the web part parameters in Sharepoint Designer, you create a new query string parameter. Then you filter the web part so that your desired column is filtered by that parameter. Then you pass in the desired value in the query string and you should get the desired results.

  • 2
    Adding to Eric's answer above, you can do everything he describes with the common dialogs. Jul 14, 2011 at 14:04
  • Thanks, PirateEric. I navigated to the web part in Designer via Site Objects > All Files > _catalogs > wp. Then clicked on it, and chose "Edit File". However, it shows only the code view and there are no options for adding parameters (or much else). What am I doing wrong? Thanks.
    – Alex C
    Jul 14, 2011 at 14:05
  • 1
    Open the page the web part is on and edit the web part there, not the web part from the catalogs folder. Jul 14, 2011 at 14:08
  • Okay. Thanks, PirateEric. Got to the parameter. However, the column I'd like to filter on has a space in it: "Infoweb Department". I've tried using "Infoweb_x0020_Department" and "Infoweb Department" for the Querystring name and setting the default value as "Accommodations", but the web part is replaced with "The server returned a non-specific error when trying to get data from the data source." What am I doing wrong?
    – Alex C
    Jul 14, 2011 at 14:23
  • 1
    When you define the QS parameter, the name you give it is what you use in the Filter dialog box, so Infoweb Departmet equals [param1] for example. The query string variable is what the web part will be looking for in the url, dept for example. So I'd end up passing in something like ...MyPage.aspx?dept=IT and this should show a filtered list of all IT listings in the Infoweb Department column. Jul 14, 2011 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.