SharepointListAdapter Object
InfoPath Developer Reference |
Represents a connection to a SharePoint list or document library. The SharePointListAdapter object represents the Microsoft Office InfoPath 2007 data adapter for retrieving data from a SharePoint list or document library.
Version Information
Version Added: InfoPath 2003
Remarks
For a secondary data source, the SharePointListAdapter object is accessible through the QueryAdapter property of a data adapter object. Data adapter objects are accessible through the DataObjects collection of the XDocument object.
The SharepointListAdapter object contains the following properties:
Property | Description |
---|---|
Name | Returns the name of the SharepointListAdapter object. |
QueryAllowed | A read-only property of type Boolean that corresponds to the queryAllowed attribute in the form definition file (.xsf). Always returns True for the SharepointListAdapter object. |
SiteUrl | A read-only property returning the Uniform Resource Locator (URL) of the SharePoint site that this adapter can query from. |
SubmitAllowed | Corresponds to the submitAllowed attribute in the form definition file (.xsf). Always returns False for the SharepointListAdapter object. |
The SharepointListAdapter object contains the following methods:
Method | Description |
---|---|
Query | Reads data from the SharepointListAdapter object. |
Submit | Because the SharepointListAdapter object is available for receiving data only, this method will always generate a run-time error when it is called on that object. |
Example
In the following example, a reference to the SharePointListAdapter object is accessed through the QueryAdapter property of a data adapter object by passing the name of the data adapter object to the Item property of the DataObjects collection:
JScript |
---|
|
After the reference has been set, you can use the methods of the SharePointListAdapter object as shown in the following example, which requeries the SharePoint list or library to update the DOM property of the data object:
JScript |
---|
|
See Also