If you haven't worked it out by now, I am using my blog to capture useful titbits on SharePoint, BizTalk and InfoPath that I don't want to forget myself.

Anyway - here's another useful one for SharePoint and Data View web parts that I think is great, but maybe just not that obvious for working out yourself.

The idea is to effectively create a simple "search" facility on a Data View web part, which is enabled by creating a Form Web Part with a single text field that provides this value as input to the Data View, the Data View is filtered based on the input value.

To create:

  1. From FrontPage 2003, add a Data View web part to your Web Part Page
  2. Configure a Filter on the Data View web part. set the Comparison to "Contains" and the Value to "Input_Parameter"
  3. Add a Form web part to the page
  4. Create a web part connection from the Form web part to the Data View web part. Have it "Provide Form values to" another web part, and set the Target Action to "Modify View using parameters from"
  5. Select the form field and map it to the Input_Parameter
  6. Give it a go.

One gotcha I came across was trying to setup a Contains filter on a Lookup column. It seems that it is a constraint imposed by FrontPage 2003. I found that you can set it on a string value, have a look at the XSLT, and then apply this same change to a Lookup column and it works fine.