Sharepoint GetListItems with a query not returning results
When I call GetListItems with the following Query:
<Query>
    <Where>
        <Contains>
            <FieldRef Name="Author"/>
            <Value Type="Text">Bob</Value>
        </Contains>
    </Where>
</Query>;
I get back a list with one row like this:
<z:row ows_ID="411" .... ows_ClientID="string;#7779" ... />
But, when I call the same list, but with this query:
<Query>
    <Where>
        <Eq>
            <FieldRef Name="ClientID"/>
            <Value Type="Number">7779</Value>
        </开发者_如何学运维Eq>
    </Where>
</Query>;
I get back no rows:
<GetListItemsResponse ...>  
    <GetListItemsResult ...>    
        <listitems ...> 
            <rs:data ItemCount="0" ....
Anyone have any idea why I'm not getting back that same row?
Because string;#7779 is clearly not 7779 nor does it claim to be a numeric type ;-)
Anyway, try:
- <Value Type='Calculated'>string;#7779</Value>
- <Value Type='Text'>7779</Value>(note not "Number")
Happy coding.
Protip: Use the U2U CAML Query Builder to speed up "finding the quirks".
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论