User Voices
Our blog on SharePoint add-ons and solutions development
« Month and Year Drop-Downs for Advanced Date Range Filtering in SharePoint | Main | Using value-range filtering and CAML operators in Filter Web Parts »

Wild-card search with SharePoint (WSS or MOSS) Filter Web Parts

Wild-card search in implement. When you're dealing with List or Business data in List Views, Business Data Lists, Data Form or Data View Web Parts, you can easily achieve the desired effect of wild-card search by simply creating any kind of filter using the FilterZen Filter Web Part and then setting the filter operator from the default kind ("Equals") to the "Contains" operator.

First set up your Filter Web Part and the Column Filter you later want to wild-card-enable. Only now do you connect the Filter Web Part to your target Web Part. Update 5/28/2010: this used to somewhat complicated (see outdated info below), but we simplified this meanwhile and you can now simply connect using the Send Filter Values connection type, no matter what type of consumer Web Part you're connecting to.

  • For a standard List View Web Part: simply connect using the default Connection type ("Provide filter values")
  • For Data Form, Data View, Business Data List or Related List Web Parts:
    • First open your FilterZen Filter Web Part settings, scroll down to the Advanced Filtering Settings section, "Allow the Connection type 'Send Multiple Filter Values' for" your Filter and save your changes.
    • Now connect to your target Web Part using the "Send Multiple Filter Values" connection type. (You need this connection type not because of its implied special abilities, but because in the current SharePoint release, it is the only connection type that tells the FilterZen Filter Web Part exactly which Web Part is connected to it in the case of Data Form, Data View, Business Data List or Related List Web Parts.)

After having set up both the Filter and a Web Part Connection, you need to be able to change the filter operator. Remember that FilterZen Filters implicitly always use the Equals operator by default. To be able to use other operators such as Contains, which you'll need to achieve a "wild-card search of sorts", you first need to enable the "CAML Direct filtering mode" in your FilterZen Web Part settings. Once this alternative filtering mode is enabled, go to any Filter settings inside the same FilterZen Filter Web Part and scroll to the bottom of the Filter settings section and you'll see a drop-down that let's you pick another filter operator. Pick Contains and Apply your changes now.

For List Views, Data Form and Data View Web Parts, your job is done now. However, any Business Data List View and Business Data Related List View Web Parts will only expose the desired behaviour after you have successfully installed and deployed the FilterZen BDC Extensions for MOSS 2007, if you haven't done so already.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>