This topic has not yet been rated - Rate this topic

GetListItemChanges Method

SharePoint 2003

The GetListItemChanges method of the Lists service returns changes made to the list since the specified date and time.

Parameters

listName   A string that contains either the title or the GUID for the list. When querying the UserInfo table, the string contains "UserInfo".

viewFields   A ViewFields element that specifies which fields to return in the query and in what order, and that can be assigned to a System.Xml.XmlNode object, as in the following example:

<ViewFields><FieldRef Name="ID" /><FieldRef Name="Title" /></ViewFields>

If this value is null, the query returns all fields for each item returned.

since   A string that contains the date and time in Coordinated Universal Time (UTC) ISO8601 format from which to start retrieving changes in the list. The value of this parameter is typically retrieved from a prior SOAP response. If this value is null, the query returns all items in the list.

contains   A Contains element that defines custom filtering for the query and that can be assigned to a System.Xml.XmlNode object, as in the following example:

<Contains>
   <FieldRef Name="Status"/>
   <Value Type="Text">Complete</Value>
</Contains>

This parameter can contain null.

Return Value

An XML fragment in the following form that contains the changes and that can be assigned to a System.Xml.XmlNode object:

<listitems xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882"
   xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
   xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"
   TimeStamp="2003-06-20T16:42:08Z" xmlns="http://schemas.microsoft.com/sharepoint/soap/">
   <rs:data ItemCount="9">
      <z:row ows_ID="1" ows_Title="t1" ows_Field="75.00000000000000" ows_owshiddenversion="7" />
      <z:row ows_ID="2" ows_Title="t2" ows_Field="689.000000000000" ows_owshiddenversion="4" />
      .
      .
      .
   </rs:data>
</listitems>

Example

The following code example displays information about items in a list that have been changed after a specified date. The example uses an XmlDocument object to create XmlNode objects for parameters.

This example requires that a using (C#) or Imports (Visual Basic .NET) directive be included for the System.Xml namespace.

Requirements

Platforms: Microsoft Windows Server 2003

Web Reference: http://Server_Name/[sites/][Site_Name/]_vti_bin/Lists.asmx

Did you find this helpful?
(1500 characters remaining)