SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a calendar list with a choice called "Category" with items A,B,C,D. I want to sort the all day events that are shown based on the selected category. I tried to set the Orderby

     <FieldRef Name="Category" Ascending="TRUE"/>

but this didn't seem to work. Is there a way to do this?


share|improve this question
Tried the below in calendar view but it seems to be ignored in Sharepoint 2010. <OrderBy> <FieldRef Name="Category" Ascending="FALSE"/> </OrderBy> It doesn't matter what fieldref I use, it always gets ignored and I read somewhere (…) it does work but others using sharepoint 2010 seem to be having same problem. Is the CAML query in 2010 calendar view somehow overwritten? the other views seem to work with the orderby but not 2010 calendar view. – user6493 Jan 20 '12 at 8:14

Check the Category field internal name is also a "Category"

share|improve this answer
Name=Category on the field that what you mean? I really need a working example (CAML) because i try to order by the Title field and it still doesn't work....has anyone been able to order their all day events in a calendar by the title or another text column – MikeC Nov 1 '11 at 14:13
I also face this issue. Does anyone have a solution for this? the URL provided by @Daniel ziga seems to be broken – George Jul 17 '14 at 13:46

Try using this tool - U2U CAML Query Builder

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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