Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: listItems qury with caml on taxonomy field

$
0
0
The following code works fine when there is no query but gets error from the service when the caml is sent. the location is the number before the ";#" of value of ows_HRLocations
(I tried "Contains" on the string after but got the same error)

Can anyone Help?
function loadFromPages(){
    $().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "Pages",
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='PublishingPageImage' /><FieldRef Name='Name' /><FieldRef Name='NameTitle' /><FieldRef Name='FeaturedItem' /><FieldRef Name='HRLocations' /></ViewFields>",
        completefunc: renderStories,
        CAMLRowLimit: 100
  });
} 

  
function loadFromPagesBy(location){
    $().SPServices({
        operation: "GetListItems",
        async: false,
        listName: "Pages",
        CAMLViewFields: "<ViewFields><FieldRef Name='Title' /><FieldRef Name='PublishingPageImage' /><FieldRef Name='Name' /><FieldRef Name='NameTitle' /><FieldRef Name='FeaturedItem' /><FieldRef Name='HRLocations' /></ViewFields>",
        CAMLQuery: "<Query><Where><In><FieldRef Name='HRLocations' LookupId='TRUE'/><Values><Value Type='Integer>"+location+"</Value></Values></In></Where></Query>",
        completefunc: renderStories,
        CAMLRowLimit: 100
  });
} 
 
function renderStories(xData, Status) {
       var itemCount = $(xData.responseXML).SPFilterNode("rs:data").attr("ItemCount");
      //alert(itemCount);
      $('#container').empty(); //Clear
      $(xData.responseXML).SPFilterNode("z:row").each(function() {
            oneStory($(this));
      });
}

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>