MrCapion
Nintex Newbie

Ever growing latest version history comment, how do I get only the very last?

Jump to solution

in order to create a workflow to update title field with name-field value, on a list where check-out is mandatory, I had to do the check-out / check-in rutine, but checking in overwrites the "comments on check-in" field and leaves it empty.

so I found: How to get latest version history comment which, to some extent works fine... it works..BUT:

it is keeping all the latest comments, and the field is growing and growing, it even takes the comments from other fields and adds them also.

 

omglong.png

 

So how do I limit it to ONLY the very last comment?

 

0 Kudos
Reply
1 Reply
MrCapion
Nintex Newbie

Re: Ever growing latest version history comment, how do I get only the very last?

Jump to solution

hmm. how to mark as solved by one self?  😀

 

the call webservice for "versions" is "standard":

the web-URL_with/_vti_bin/Versions.asmx

web method: getversions

filename string :  item URL 

 

store result in:  a text-variable ( single line which I named  "tmp_comment" )

 

then:

Query XML

 

XML-Source:

{WorkflowVariable:tmp_comment}

 

process using: Xpath

//defaultNS:result/@comments

 

store in: a text-variable ( single line which I named "Newcom" )

 

Then:

Check OUT > current..   ( has to be checked out in this list, made mandatory in by me )

 

In between here I actually copies the filename IF is changed to the Title field.

( the strange lack of function i SharePoint, where uploaded files is stored i a "name" field, and "title" left unused, so no one can use it for a lookup field. )

 

Then:

Check IN: 

from: Current

Comments: {WorkflowVariable:newcom}

 

Check in type: Major ( i did not see any change in the version anyway, it kept my "current version" )

 

but, bottom line, I made it work that way.

It copies my comment at check in, stores it, 

View solution in original post

Reply