2

I have looked around a bit, but have not found any reference to this particular issue. Is it possible to specify a custom ordering in a CAML query? What I mean by this is, say I have a list with a column that contains values 'Apple', 'Orange', and 'Grape', and I would like to create a CAML query that will group items by these values, order them within the groups and return the whole list ordered as ['Orange', 'Apple', 'Grape']. Is there a way to specify such an ordering?

2

You can do that using the GroupBy attribute in CAML query. Here is a link of how to format your caml to include the GroupBy statement: http://discoveringsharepoint.wordpress.com/2011/09/20/caml-query-example-including-groupby/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.