This is for NW2010. I have a document library with versioning enabled. I have a workflow that runs on an item update. What I need to be able to do is to have a condition based on the last version comment. Why? I have a 3rd party product which updates document libarary items, and leaves a particular commentin the version history. I need a condition that says "if latest Version History comment = 'edited by FooMaster 2000' then...
A search here for "version history" took me to https://community.nintex.com/message/4686?sr=search&searchId=b2a79e50-366e-437f-bef7-5b8216ef0603&se... which in turn pointed to another item mentioning a web service, but none of that ever said anything about how to actually read in version history information.
How would I go about getting the latest version history comment so I could throw it into a variable or use it in a conditional statement?
Solved! Go to Solution.
Hi Alan,
firstly, make a call to the Versions.asmx web service with the Call Web Service action.
Then, use the Query XML results, to pull out the first comment, using the xpath //defaultNS:result/@comments
The textTemp variable will contain the latest versions comments.
Hope that helps
Vadim
While we are talking about versions, there is a client who put a request to have the track changes functionality in SharePoint list. So my question is, is there a way that the version can show you in a multitext column what has changed from previous version? I know this a long short but Vadim Tabakman you always amaze me with your answers.
Regards
Bhuti
Hi Bhuti,
I think to get changes, you will need to call the Lists.asmx web service, and specifically the GetListItemChanges web method.
I was in the process of writing up a blog post about it a while ago, but it becomes so confusing. I need to get back to it when I have some time.
cheers,
Vadim
I will keep an eye on that blog.
Will try the web service.
Regards
Bhuti
Bhuti Mbele
SharePoint Technical Lead
Investec Asset Management
bhuti.mbele@investecmail.com
+27 21 416 1898
36 Hans Strijdom Avenue Foreshore, Cape Town, 8000
http://ishare/mysite/bmbele/<http://http://ishare/mysite/bmbele/>
I thought I would add on a comment which may help future readers of this thread. There turned out to be an easier solution. One of the columns in my document library is "Check In Comments", which ended up being populated by the vendor's app whenever it did it's update. I was able to utilize this in a condition, where I could test if the "Check In Comments" ends with (in my case) "PDF Share Forms Enterprise". So, while it may not apply for everybody, check those extra columns which SharePoint adds in on its own, they may be of use.
Awesome Alan. Thanks for sharing that!!
Hey Vadim,
When you choose the Item property "CheckIn Comments" the result is the same.
But you are more flexible with the webservice.
"//defaultNS:result/@created" gives the time when you leave the comment
"//defaultNS:result/@createdByName" gives who leaves the comment
And after that you can store the results in variables and can do everything you want.
Cheers Christof
Hy Vadim,
Thank you for this, it seem to be what I'm looking for. The only issue I have is that I keep getting the 'The remote server returned an error:(500) Internal Server Error. Would you be able to offer any advice as to why I might be getting this?
Thanks
Claire
Hi Claire,
a 500 error usually mean either your URL is incorrect, or you're passing invalid data to the web service and it's freaking out.
What does your web service call look like?
Vadim