Getting Version History and What Field has Changed

Apr 16, 2012 at 6:56 PM

I am using the GetVersionCollection to get the history information from my list.  This seems to be working fine; however, what I need to do is get the version history of each individual item which has been changed in the SharePoint list.  From what I understand on the web service call, it goes by individual list item and the version of that item by ID.  Is there a way to get the information of the list item which has been changed?  I need this to work like the View History in SharePoint but what I am trying to do is view all versions changed for all items based on date instead of one at a time.

Apr 17, 2012 at 7:46 PM


You'll need to combine calls into several of the operations inside an .each() loop.


Apr 17, 2012 at 9:24 PM

That is what I have been doing now and I am getting all of the data back.  My issue is showing only the items which have been updated in a particular date.  i would post the code in here but for some reason, copy and paste does not work and it is quite a bit of code.  What I am doing is using a GetList call to retrieve the names of the columns because I am going to have to do this dynamically.  I will not know how many columns are being used.  I am dumping those into an array, filtering them, and placing my filtered array back into a GetListItems call for IDs and any other required field columns.  For the Versions, I am using a separate GetVersionCollection call for each of the columns I want to use.  I am going to use a for loop to step through the amount of filtered columns and use that count to dynamically create an individual SPServices call for each column.  ( I hope I was clear on that :) )

I am getting all of my data.  My problem is I cannot use any type of data storage to compare the fields to see which ones have been updated or changed.  All of this has to happen at run time which is making this difficult.  So, instead of showing all data, I need to only show what has updated for a particular data for all projects and all times since implementation.  Basically, I want it to look like the existing View History in the SharePoint list, but instead the Version of one item; i want to show them all.  I hope I explained myself okay.  It is hard to describe without seeing it, and like I said, if copy and paste workedI would put my code in here.  If I do not get it in a day or so, I might type it out anyways.

Thanks for the response!!!!