Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

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 (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 Jan 20 '12 at 8:14

2 Answers 2

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

share|improve this answer
    
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 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 at 13:46

Try using this tool - U2U CAML Query Builder

share|improve this answer

Your Answer

 
discard

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.