Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Parameters in SharePoint Designer: convert empty string to null

  Asked By: Jaron    Date: Aug 16    Category: Sharepoint    Views: 3062

Is there any way to alter this? I could've sworn that the last time I
created a filtered DataView, I had an "Advanced" button for each parameter
that would let me mess with this stuff, as well as an Advanced button that
would let me tweak the XPath for each Filter rule.

For some reason, though, I have none of that available to me right now, and
I *think* that as a result, my empty parameters are being converted to Null,
which means that no records are returned.

Does anyone else remember being able to do this?



2 Answers Found

Answer #1    Answered By: Ali Javed     Answered On: Aug 16

If you go to the Common Tasks flyout for the DataForm web part in Designer and
use the parameters  link you can set default values for the parameters. That way
an empty  string will convert  to the default rather than a Null.

Answer #2    Answered By: Karrie Wooten     Answered On: Aug 16

The problem with that approach is that if a
column isn't necessarily going to have a specific character in it, the
default value will exclude some data. Leaving the default setting empty
will apparently convert  to a null  by default (I have no other explanation
for why "contains an empty  string" would return nothing).

FYI, I ended up with the contorted strategy of calling the list as a web
service, at which point I can directly edit the XPath criteria for the
filter (since the WS returns XML).