tags:

views:

38

answers:

1

Does anyone know if it's possible have a sharepoint lsit view sort by more than 2 columns. Wned I go to modify the view in the UI I'm only allowed to enter two sort fileds. I tried to do it in the Source like this:

> <Query>
>           <GroupBy Collapse="TRUE" GroupLimit="100">
>             <FieldRef Name="Category" />
>             <FieldRef Name="SubCategory" />
>             <FieldRef Name="Topic" />
>           </GroupBy>
>           <OrderBy>
>             <FieldRef Name="Category" />
>             <FieldRef Name="SubCategory" />
>             <FieldRef Name="Topic" />
>           </OrderBy>
>         </Query> 

I get an error on the page:

<!-- #RENDER FAILED -->
+1  A: 

I just used the Caml Query Builder from U2U and the query below runs fine against my 2010 server. I don't have a 2007 server to test it against so I can't gurarantee it will work for you. Get the tool though, it will help a LOT!

http://www.u2u.be/Res/Tools/CamlQueryBuilder.aspx

<Query>
  <OrderBy>
    <FieldRef Name="ID" Ascending="True" />
    <FieldRef Name="_DCDateCreated" Ascending="False" />
    <FieldRef Name="_UIVersionString" Ascending="True" />
    <FieldRef Name='Created' Ascending='True' />
  </OrderBy>
</Query>
Joe Capka