Hi I've been working on my csom application and needed a way to group list items via an attribute. This also needed to be paginated as well.
Initially I just went for groupBy, seemed to be what I needed to get the unique attributes and then I would get the counts and go from there.
As we all know now though groupBy doesn't do this. So I looked harder and it does have this collapse and GroupLimit. I thought that would be good as it would limit the numbers in each group. Again no. No matter what I put as the collapse (true or false)
The rowLimit for the whole query is respected but is used for each row returned.
So that me to looking at my query with an orderBy and groupBy and it seemed I was doing the counts for each group. It didn't do the GroupLimit (which would have been nice). So I dropped it and what happened to my results - nothing - same as before!
So I ask what is the point of GroupBy? - what is it meant to do?!