Skip to main content

I have an automation cloud workflow that fires on the SPO Check-in and Publish Major version event, however I am not able to get the user’s check-in Comment from the Start Event - it’s not available as a start value nor as a value from querying the list/library after commencement.

Apart from having to a HTTP request as parse XMLor JSON, is there an alternate method to get this?

TIA
Rob

Hi @Robbayly 

 

User comments for version control on SharePoint are stored inside the version history its self, it is obtainable via a web request to the item using a SharePoint Web Request action in Nintex.

 

It would look something like this, you will need the site URL, list/library name and item ID:

 

 

The web request would be configured as a Post to the following URL:

<​​‍‍Site URL‍​]/_api/web/lists/getbytitle('​‍‍sList Name‍​]')/items(​‍‍[ID‍​])/versions?$filter=IsCurrentVersion eq true​

 

with the request headers as:

Accept: application/json; odata=nometadata
Content-Type: application/json; odata=verbose

 

 

After that you can use the output of the web request to get the commit comments using a query JSON as follows:

$.valuen0].OData__x005f_CheckinComment

 

 

The output should be the latest versions check in comments, as below.

 

 

I have added an export key here for you. (edited to add permanent key)

 

mZioiNrQHTyRe9ocpoAZSkdj7VVZfidvTMbL6J4YqyJM5qY82

 

Hope this helps

Jake.


Thanks for the response - already resolved it back then. Used the following to get the last check-in comment:
  /_api/web/lists/getbytitle('(Library name]')/items('(ID]')/Versions?$top=1&$orderby=VersionId%20desc

And from the Reponse Content - JSON Query - 

  $.d.results

  • .OData__x005f_CheckinComment


  • Reply