CAML GroupBy Query in SPServices GetListItems

Aug 5, 2014 at 7:56 PM
Hello all,

New user, so please be forgiving. I'm using SPServices' GetListItems to recreate a list in a table so that I can tweak it and add custom images to rows based on validation, etc. However, I'm running into an issue here. Does GroupBy work in the CAMLQuery line? OrderBy and my Where statements are resolving just fine, but when I put in GroupBy statements it completely errors out the query and the list is returned in its native format.

My code is a bit long, so I don't want to paste the whole thing, but can upon request. Here is my query line, though:

CAMLQuery: '<Query><GroupBy Collapse="TRUE" GroupLimit="30"><FieldRef Name="a"/></GroupBy><OrderBy><FieldRef Name="ID"/></OrderBy></Query>',

Any help is greatly appreciated.


Aug 6, 2014 at 1:04 AM
I don think the WebServices support GroupBy.

Paul T.

-- Sent from Mobile

Marked as answer by Jkholzsager on 8/16/2014 at 9:20 AM
Aug 10, 2014 at 2:43 AM
Edited Aug 10, 2014 at 2:44 AM
Nope. Ditto what Paul said. You can build whatever grouping logic you want in your code or use a plugin which provides it.

Aug 16, 2014 at 4:20 PM
Excellent, kind of figured. Thanks for verifying!