views:

55

answers:

3

Using the lists webservice I retrieve the items from a list. In the XML returned I can see the attribute ows__IsCurrentVersion="1" which I assume is the same as the file object model (i.e. a boolean to say if it is current or not).

However I do not see a way to identify what revision it is? What should that attribute be?

+4  A: 

By 'revision' do you mean version? If so, you are probably looking for one of these attributes:

  • ows_owshiddenversion is an Integer (ex: 8)
  • ows__UIVersion is an Integer (ex: 4096)
  • ows__UIVersionString is a String (ex: 8.0)

*edit*

Here is some more information after testing it using a Document Library. You should also check the other comments by Hugo and Janis, as they have some good information.

ows_owshiddenversion   ows__UIVersion   ows__UIVersionString
1                      512              1.0
2                      513              1.1
3                      514              1.2
4                      1024             2.0
5                      1025             2.1

Most likely, what you are looking for is ows_owshiddenversion.

Kit Menke
Can you go into more detail on the differences on them?
Robert MacLean
I've edited my answer. If you update your question with what you are attempting to do, I can give a more specific answer.
Kit Menke
+2  A: 

The columns in the list you are looking for are VersionID (usually 512, 1024, etc.) and VersionLabel (usually 1.0, 2.0, 3.0) and the attributes that Kit Menke pointed out will give you that information if you are using the Web Service.

You might want to have a look at the Versions web service if you need to do more work with the web services : http://server/_vti_bin/versions.asmx

Hugo Migneron
+2  A: 

Ill just add some info. You can use UIVersion (which is version id) or UIVersionString (which is user-friendly version label)

For example

  • label 0.1 -> id 1
  • label 1.0 -> id 512
  • label 1.1 -> id 513
  • label 2.0 -> 1024
  • label 2.2 -> 1026.

IsCurrentVersion will be true for latest MAJOR (published) version (2.0 or 3.0, but not 3.1). Minor version number is draft version.

Some insights about versioning i wrote in my own question & answer.

Janis Veinbergs
This was a great example! Nice info.
Kit Menke