AnsweredAssumed Answered

Getting version history of an Excel document and usable output?

Question asked by calmaguer on Jul 14, 2017
Latest reply on Jul 16, 2017 by emha

I have a list with a column that contains an Excel file URL that is stored in a library on the same Sharepoint site.

 

Currently I have a scheduled site workflow that runs weekly and pulls items that meet certain criteria into a variable and fires a notification listing the item URLs of those items that meet or don't meet the criteria.  This part is working fine.

 

My goal is to get the version history of that file pushed into another column so that I can consume it with the scheduled site workflow and report out on the version history of the Excel file associated with each item.

 

Currently my report looks something like this:

Items that met SLA:

 

<Item URL 1>

<Item URL 2>

<Item URL 3>

 

Items that did not meet SLA:

 

<Item URL 4>

<Item URL 5>

<Item URL 6>

I would like it to look like this:

 

Items that met SLA:

 

<Item URL 1>

History:

Version 0.1 created 7/14/2017 12:54PM by Reynolds, Malcolm

Version 0.2 created 7/14/2017 2:32PM by Tam, River

Version 0.3 created 7/20/2017 8:35AM by Frye, Kaylee

 

<Item URL 2>

History:

Version 0.1 created 7/11/2017 5:55PM by Serra, Inara

Version 0.2 created 7/12/2017 12:42PM by Cobb, Jayne

Version 0.3 created 7/20/2017 11:35AM by Book, Derrial

 

...you get the picture.

 

 

I'm calling Versions.asmx and using GetVersions to get an XML string that is full of these for each version :

 

<result version="0.1" url="https://@domain/site/sitename/_vti_history/5/Library/Test Excel Document.xlsx" created="6/14/2017 12:54 PM" createdRaw="2017-06-14T16:54:42Z" createdBy="i:0#.w|farm\reynoldsm" createdByName="Reynolds, Malcolm D" size="169038" comments="" />

 

So if the file has 10 versions, there's just a wall of these <result version> results.

 

I need help parsing these into something readable and getting them into a column so that I can use the text in a notification.

 

Thanks in advance for any help!

Outcomes