This project has moved and is read-only. For the latest updates, please go here.

Problem with GetListItems

Sep 9, 2010 at 9:51 PM

Hi, I'm trying to use GetListItems, but does not filter and I get all the items in the list, but I just want to get one according to a filter.

I'm using something like this:

        var valor = 5;

            operation: "GetListItems",
            async: false,
            listName: "Gerencias Impactadas",
            CAMLQuery: "<Query><Eq><FieldRef Name='Interesados' LookupId='true'/><Value Type='Lookup'>"+valor+"</Value></Eq></Query>",
            completefunc: function (xData, Status) {
           $(xData.responseXML).find("z\\:row").each(function() {

            var num = $(this).attr("ows_Interesados");


Hopefully someone can help me out


Sep 10, 2010 at 3:55 AM


I don't see anything obviously worng. Try adding


in the completefunc to see the whole resultset. Maybe that will show you something.

Also, see this blog post for info about using the z:row namespace with other browsers:


Sep 10, 2010 at 3:34 PM

Problem solved, I use that line of code.

CAMLQuery: "<Query><Where><Eq><FieldRef Name='"+item +"' LookupId='True'/><Value Type='"+tipo+"'>"+valor+"</Value></Eq></Where></Query>",


Sep 10, 2010 at 4:46 PM

Ah! You were missing the <Where> clause. Sorry I missed that; doing too many things at once.

Glad you got it working!