February 9, 2012  
   Login  
Forum  
 
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da..._UIVersionString column sort order_UIVersionString column sort order
Previous Previous
 
Next Next
New Post
 9/10/2009 10:33 PM
 

 

I have a report showing the version history of a list item. All is well with the exception of the _UIVersionString column sort order. It seems that no matter what I do it always displays newest to oldest:

3.0
2.0
1.0

I need to show oldest to newest

1.0
2.0
3.0

Below is the CAML used.... I added <FieldRefName ="_UIVersionString"/> with no luck; ascending or descending, the order never changes.

<?xml version="1.0" encoding="utf-8"?>
<root xmlns="http://enesyssoftware.com/schemas">
  <queryName></queryName>
  <description></description>
  <list title="Review Comments" relativeSiteUrl="/ipoms/pakistan/" tableName="Review Comments" stripHtml="true" itemVersions="0">
<fields>_UIVersionString,Modified,Editor,Track,Lesson,Document_x0020_Type,Comment_x0020_Category,Page_x0020_or_x0020_Slide_x0020_,Origin,Comment,Customer_x0020_Priority,Contractor_x0020_Comment,ID,Status</fields>
    <query>
      <OrderBy>
        <FieldRef Name="Track" />
        <FieldRef Name="Lesson" />
      </OrderBy>
    </query>
  </list>
  <resultSet>Review Comments</resultSet>
</root>

Can you help?

Thanks, Bill

 

New Post
 9/11/2009 10:45 AM
 

Hi Bill,

As you are using the item versions, some functionnalities may not be available in the CAML Query. We don't directly retrieve all the data from SharePoint using the CAML query. We need to retrieve the list items using the CAML query, and then the item versions from another Web Services. _UIVersionString is one of the field that we retrieve using the Item Versions Web Services, therefore you won't be able to order by this field in the CAML Query.

If you need to order the items, you will need to add an sqlQuery statement just after your list statement:

<sqlQuery tableName="Ordered Review Comments">
SELECT *
FROM [Review Comments]
ORDER BY _UIVersionString
</sqlQuery>

Don't hesitate to contact us if you need more information.

Regards,
Marien Monnier
Enesys

Previous Previous
 
Next Next
ForumForumEnesys RS Data ...Enesys RS Data ...Support - RS Da...Support - RS Da..._UIVersionString column sort order_UIVersionString column sort order

 
You need to login for posting to the forums.
If you don't have a login, click here to register.
 
Copyright 2010 Enesys - All rights reserved Terms Of UsePrivacy Statement