I have been trying to add a little more flexibility to an existing sharepoint site. Currently some webparts look at the querystring to determine what documents should be displayed to the user. IE if the querystring has http://blahurl?Doc=Policy then the document relating to policy would be displayed.
Works well, however I wanted to be able to list documents that may have been marked as ‘Policy - Email’ or ”Policy - Leave’ etc.
When using the default way of editing these webparts via frontpage. I selected the Filter link for the webpart I wish to edit, the only options that are available for comparing the field with the query string, were only the numeric comparisons were available in the dropdown (Equals, Is Null, Less than etc). I was after the “Contains” comparison.
I went back to the webpart in frontpage and selected web part properties and edited the Data Query Editor xml fragment. The section to change is
<dsp:where xmlns:dsp=”Http://micorsoft…….”>
<dsp:Eq>
<dsp:FieldRef Name”Yourfield”/>
<dsp:Value Type=”xsd:string”><udc………..>
</dsp:Eq>
</dsp:where>
Change the <dsp:Eq> to <dsp:Contains> and the closing tag as well. There is another string comparison that can be used but the link where I got the info from is
It all worked well and was even reflected in the filter string visible in Frontpage.
Hope this helps someone.



I’m tyring to do something similar. However I want to dynamically change the filter value based on another value on the page
I’ve added a List webpart to DispForm.aspx, but I want the filter value to be equal to the
Something like this:
Of course, this code won’t work, but what will?
Hank
Comment by Hank — April 4, 2007 @ 9:27 pm