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 the individual item which has been changed in the SharePoint list. From what I can understand on the web service call, it goes by individual list item and the version of that item. 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 version changed for all items based on date instead of one at a time. Here is what I have done so far:

<script type="text/javascript" language="javascript">

$(document).ready(function() {

var proID = new Array();
var proTitle = new Array();
var proModified = new Array();
var proHistory = new Array();
var i = 0;

   operation: "GetListItems",
   async: false,
   listName: "NewProjects",
   webURL: "http://devchrisl01/test",
   //CAMLQuery: '<Query><Where><Eq><FieldRef Name="ProjectOpen" /><Value Type="Boolean">1</Value></Eq></Where><OrderBy><FieldRef Name="Title" Ascending="True" /></OrderBy></Query>',
   CAMLViewFields: '<ViewFields><FieldRef Name="Title" /><FieldRef Name="ID" /><FieldRef Name="Modified" /><FieldRef Name="History" /></ViewFields>',

   completefunc: function(xdata, status) 

        $(xdata.responseXML).SPFilterNode("z:row").each(function() {

            var xitem = $(this);
            var ID = xitem.attr('ows_ID');
            var Title = xitem.attr('ows_Title');
            var Modified = xitem.attr('ows_Modified');
            var History = xitem.attr('ows_History');

            proID[i] = ID;
            proTitle[i] = Title;
            proModified[i] = Modified;
            proHistory[i] = History;




for (i=0; i < proID.length; i++){

  operation: "GetVersionCollection",
      async: false,
      webURL: "http://devchrisl01/test",
      strlistID: "NewProjects",
      strlistItemID: proID[i].toString(),
      strFieldName: "History",
      completefunc: function (xdata, Status) {

        $(xdata.responseText).find("Version").each(function() {


            var xitem = $(this);
            var ID = xitem.attr('ID');
            var Title = xitem.attr('Title');
            var Modified = xitem.attr('Modified');
            var History = xitem.attr('History');

                //var data = "<tr><td>" + proID[i].toString() + "</td><td>" + proModified[i].toString() + "</td><td>" + proTitle[i].toString() + "</td></tr>";
                var data = "<tr><td>" + proID[i] + "</td><td>" + Modified + "</td><td>" + History + "</td><td>" + proTitle[i] + "</td></tr>";










<form id="form1" runat="server">

<table id="tester" cellpadding="5px"><th>Project Number</th><th>Modified</th><th>History</th><th>Project Name</th></table>  



I am getting the information back for each list item doing it this way, the only thing missing is the information of the list item which has been changed. I only want the list items to show if the item has been changed. Doing it this way, I am getting everything back. I hope I am being clear on what I am trying to do. Thanks for the Views!!

  • Have you tried using search to pre-filter items by list URL and date before calling the webservice for specific items? Oct 5, 2014 at 10:31

1 Answer 1


To get a list of which Items has changed since a certain time you can use Lists.GetListItemChanges, but to get the individual changes you have to loop through the Version History and build it up.

  • I am not going to be able to put a time into the code. This would work, but my big caveot is not being able to hard code a date. Thank you for the response :)
    – lazoDev
    Apr 17, 2012 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.