SPFilterNode.Count

May 1, 2012 at 2:16 PM

Can anyone tell me if there is a .Count function on SPFilterNode? Like this:

 

 

 

 

 

 

$(xData.responseXML).SPFilterNode(

"z:row"

).Count

 

 

 

 

 

 

 

 

 

 


May 1, 2012 at 3:24 PM

var rowTotal = $(xData.responseXML).SPFilterNode("rs:data").attr("Count") *1;

Should be something similar to that.  To look at the response that comes back, you can open the Developer tools and use the console logger.

console.log(xData.responseText);

That'll show the xml in the raw that is returned from the web service call.

Cheers,
Matt

May 1, 2012 at 6:42 PM
I believe SPFilterNode returns a jQuery object, thus both .size() should be available (also... because an Array is returned, .length is also a good option)

_________
Paul T


Coordinator
May 3, 2012 at 3:04 AM

The jQuery object probabvly doesn't have a size that represents something meaningful. The rs:data node will be in there, for instand. The attribute there that gives the count is ItemCount.

<rs:data ItemCount="7">

M.