Sharepoint Tips And Tricks is Ishai Sagi's sharepoint information blog. It specializes in Microsoft SharePoint technologies, including web parts, development, configuration, customization, and best practices for the use of Microsoft SharePoint Server and Windows SharePoint Services.
It also provides some related Office Information, including VSTO and VSTA and other office application development tips.
Wednesday, July 02, 2008
CAML sorting by file name
If you are doing a CAML query and want the results sorted by the file name (and not by title, which may be different than the file name) use the following:
<OrderBy><FieldRef Name='LinkFilenameNoMenu' /></OrderBy>
2 comments:
Anonymous
said...
For the "order by" people need to realize that they have to put it outside of the "where" statements. I fall into the trap many times by adding it inside and nothing works.
2 comments:
For the "order by" people need to realize that they have to put it outside of the "where" statements. I fall into the trap many times by adding it inside and nothing works.
Great tip....You save me! Thanks a lot!
:)
Post a Comment