开发者

BDC Filtering Operator Options - SharePoint 2007

I have a SharePoint 2007 BDC Instance setup with a method that includes a simple filter on it, but I am coming up just a tad short in the definition to give me the desired Operator option in the filtering options of the Business Data List web part.

Using the web services I was given, my "Finder" web method implements the equivalent of a query that looks like:

     SELECT * FROM Customers where City LIKE '%' + @MyParameter '%'

With this query, if I create my FilterDescriptor with either of the below:

     <FilterDescriptor Type="Comparison" Name=Parameter />
     <FilterDescriptor Type="Wildcard" Name=Parameter />

The first gives me an "Is Equal To" operator option, the second gives me four options: "Contains", "Starts With", "End开发者_如何学JAVAs With", and "Is Equal To". Neither of these are correct because both are misleading to the users since the query is always executing using the "Contains" logic. I don't want to give them any options beyond "Contains". Is there a way to accomplish this?

Thanks a lot, Greg


Its probably always executing Contains logic because the way you have written your SQL query. Change your query to this

SELECT * FROM Customers where City LIKE @MyParameter

and SharePoint will substitute the proper wildcards for you depending on which option Contains, Starts With, Ends With, Is Equal To the user chooses.

I'm not sure how, or if its possible, to remove the Starts With, Ends With and Is Equal To options from the web part

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜