1

If I specify multiple parameters for a DVWP, I seem to have to always provide a value in the query string or I get nothing. For example,

 [url]?filter=waldo&category=book

How would I specify "everything from waldo and not limited to books" presuming that I must provide the 'category' parameter in the URL (which seems to be true for this web part)? One would presume something like * should work but it doesn't.

There is a field for "default value" but the question still applies: how to specify any, or all, or don't care.

2

You'll need a compound filter condition, something like this:

<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[@Category = $Category or $Category = '*']"/>

where

$Category is the parameter you've set up for the category Query String value

This way, if you pass an asterisk '*' for category, you'll get all categories.

0

Michael,

DefaultValue="*"

...should work.

But the question comes in with how that's passed to the query.

Can you post the SharePoint:SoapDataSource tag here for troubleshooting?

  • Will look for SoapDataSource, but for now with 'fair' and 'appt' specified within the DVWP, .../ReviewResume5.aspx?fair=something&appt=student returns a row .../ReviewResume5.aspx?fair=''&appt='' and .../ReviewResume5.aspx?fair=""&appt="" return nothing. – Michael Broschat Jan 5 '11 at 12:55
  • The '*' will only work as a string value, not in any sort of wildcard way. – Marc D Anderson Jan 5 '11 at 14:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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