ListItems Method
Lists the items in the specified SharePoint list.
Syntax
splist.listItems([callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
The Item event will be fired for each item. The Items collection will contain the received items.
The Query property can be used to select a subset of items.
Example:
ListControl.Query = "<Query><Where><Gt><FieldRef Name="ID" /><Value Type="Counter">1</Value></Gt></Where></Query>"; ListControl.ListItems(); for (int i=0; i<list.Items.Count; i++) { Item item = ListControl.Items[i]; for (int j=0; j<item.FieldCount; j++) { item.FieldIndex = j; print item.FieldName + " = " + item.FieldValue; } }If the results are paged the ItemMarker property will be populated. You may then call ListItems again to get the next page of results. To get all the results continue to call ListItems until ItemMarker is empty.