2

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

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

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

TIA

1
  • 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 (nickgrattan.wordpress.com/2008/01/23/…) 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
    Commented Jan 20, 2012 at 8:14

2 Answers 2

1

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

2
  • Name=Category on the field definition....is 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
    Commented Nov 1, 2011 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
    Commented Jul 17, 2014 at 13:46
1

Try using this tool - U2U CAML Query Builder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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