A SharePoint 2010 list view web part can only interpret one wildcard filter from the query string parameters at a time.
If you need to apply multiple wildcard filters to a list view, you can use SharePoint Designer to add parameters to the list view and filter the view by those parameters.
You can then hook into those parameters with web part connections through the browser, using filter web parts or the more basic HTML form web part, or you can have the parameter values come from the query string.
Using SharePoint Designer to Automatically Filter on Query String Parameters
- Edit the desired page in SharePoint Designer
- Click within the body of a list view on the page to bring up the List View Tools menu in the ribbon
- In the Options tab in List View Tools, click the Parameters button to open the "Data View Parameters" dialog
- Click the "New Parameter" button
- Name the parameter something meaningful; I'd go with
topicFilter if you're filtering on the topic field, for example
- Change the Parameter Source to "Query String"
- Set the Query String Variable to a short value, such as "topic"... this is what you'll be appending to the URL as a query string parameter
- If you want certain items to be displayed or hidden when no parameter value is provided, put in a default value based on your requirements
- Click the "OK" button when done
- Click within the body of your list view again and this time click the Filter button in the Options tab
- Add a new clause
- Choose the column you want your parameter to filter against in the Field Name column
- Choose "Contains" from the dropdown in the Comparison column
- In the Value dropdown, choose your newly created parameter value (which you named in step 4 above)
When you save the page, your list view will now filter on the value provided to the query string. For example, if you added a parameter that uses a query string variable called "topic", you can filter by that parameter by appending
?topic=value to your URL, where
value is the value by which you want to filter.
You can repeat the process to add more filtering parameters to filter on multiple fields.
Having the Filters Show All Items By Default
The above technique generally results in the list view showing no items until you provide the required filtering parameters.
If you need the opposite functionality-- with the view showing all items, but allowing you to gradually drill down based on provided filter values-- the only option I'm aware of is to have the default value for the filter be something that will always be true. Unfortunately, that's very much dependent on your column values.
For example, if you can finagle it so that your topic column always contains the topic plus an asterisk character, then a default filter value of
* will show all entries.
A potential solution is to copy the column values to another column with some wildcard character appended. This can be accomplished via workflow or event receiver, or even just a calculated column, although that can affect your filtering options since calculated columns can't be indexed. The new column can be hidden from the forms as desired, since you don't want users directly changing its value.
Once you have the new column populated, you can then adjust your list view in SharePoint Designer so that the parameter has that wildcard character as a default value, and then adjust the filtering so that it filters against the new column instead.