Skip to content

aListCollection statement

The aListCollection statement returns information for all lists in one or multiple sites.

<aListCollection tableName="">
<from type=""></from>
<fields></fields>
<where></where>
</aListCollection>

Specify one or more web sites from which to retrieve the list collection. The type attribute will indicate how site URLs are specified.

Type Description
Url Specify one or more relative site url separated by a comma. A report’s parameter may be specified instead of a literal value.
ResultSet Specify the tableName value of another statement. The resulting data from the statement must contain a column named “relativeSiteUrl”.

The following statement will return all the lists located in sites “/sites/demo/” and “/sites/ersdetest”.

Sample

<aListCollection tableName="ListCollection">
<from type="Url">/sites/demo/,/sites/ersdetest/</from>
<fields>*</fields>
<where></where>
</aListCollection>

In the following example, the query will return information about all lists in the sites specified in another result set called “MergingList”. The “MergingList” result set contains data returned by a list statement that queries the “Merging List” SharePoint list.

The SharePoint list “Merging list” must contain a column called “RelativeSiteUrl” that contains relative urls that point to SharePoint sites.

The aListCollection statement will retrieve list collection for each item in the “MergingList” result set based on the “RelativeSiteUrl” column’s value.

Sample

<root xmlns="http://enesyssoftware.com/schemas">
<list title="Merging list" relativeSiteUrl="/sites/demo/" tableName="Merginglist">
<fields>relativeSiteUrl</fields>
<query></query>
</list>
<aListCollection tableName="aListCollection">
<from type="ResultSet">Merginglist</from>
<fields></fields>
<where></where>
</aListCollection>
<resultSet>aListCollection</resultSet>
</root>

Specify the fields to be returned by the statement.

Field Description
DocTemplateUrl The URL of the document template for the library relative to the Web site that contains the document library.
DefaultViewUrl Default view for the list.
MobileDefaultViewUrl Default mobile view for the list.
ID GUID that identifies the list in SharePoint.
Title Displayed title for the list.
ImageUrl Server-relative URL for the icon that represents the list.
Name GUID that identifies the list in SharePoint.
BaseType Base type for the list.
BaseTypeLabel Name associated to the base type for the list.
FeatureId The GUID of a Feature to associate with the list.
ServerTemplate List definition type on which the list is based.
ServerTemplateLabel String representing the list definition type on which the list is based.
Created Creation date and time for the list.
Modified Date and time that an item, field, or property of the list was last modified.
LastDeleted Date and time that an item in the list was last deleted.
Version Version number of the list.
Direction Direction of the reading order for the list.
ThumbnailSize Width of the thumbnails to display in picture libraries.
WebImageWidth Width, in pixels, of an image in a picture library.
WebImageHeight Height, in pixels, of an image in a picture library.
Flags
ItemCount Number of items in the list.
AnonymousPermMask The base permissions for anonymous users of the list.
RootFolder Folder that contains all the files that are used in working with the list.
ReadSecurity Read security setting for the list.
WriteSecurity Write security setting for the list.
Author User who created the list.
EventSinkAssembly Strong name of a file in the global assembly cache that provides a Windows SharePoint Services 2.0 event handler for document library events.
EventSinkClass Fully qualified, case-sensitive name of a class that defines a Windows SharePoint Services 2.0 event handler for document library events.
EventSinkData Arbitrary string for use by a Windows SharePoint Services 2.0 event handler for document library events.
EmailInsertsFolder Path for the public folder that contains the e-mail items inserted in the document library.
EmailAlias Mail address to use to notify to the owner of an item when an assignment has changed or the item has been updated.
WebFullUrl
WebId The GUID of the site containing the list.
SendToLocation URL to use when copying an item in the list to another document library.
ScopeId The ID of the site in which the scope is created.
MajorVersionLimit Maximum number of major versions allowed for an item in a document library that uses version control with major versions only.
MajorWithMinorVersionsLimit Maximum number of major versions that are allowed for an item in a document library that uses version control with both major and minor versions
WorkFlowId
HasUniqueScopes
AllowDeletion Boolean value specifying whether the list can be deleted
AllowMultiResponses Boolean value specifying whether users are allowed to give multiple responses to the survey.
EnableAttachments Boolean value that specifies whether attachments can be added to items in the list.
EnableModeration Boolean value that specifies whether Content Approval is enabled for the list.
EnableVersioning Boolean value that specifies whether versioning is enabled for the document library
Hidden Boolean value that specifies whether the list is hidden.
MultipleDataList Boolean value that specifies whether the list in a Meeting Workspace site contains data for multiple meeting instances within the site.
Ordered Boolean value that specifies whether the option to allow users to reorder items in the list is available on the Edit View page for the list.
ShowUser Boolean value that specifies whether names of users are shown in the results of the survey.
EnableMinorVersion Boolean value that specifies whether minor versions are enabled when versioning is enabled for the document library
RequireCheckout Boolean value that specifies whether forced checkout is enabled for the document library.
EnableAssignedToEmail Boolean value specifying whether e-mail notification is enabled for the list

SQL Where clause used to filter the resulting data.

The following query returns information about lists (located in “/sites/ersdetest” site) that are not hidden and for which versioning has been enabled:

Sample

<aListCollection tableName="ListCollection">
<from type="Url">/sites/ersdetest/</from>
<fields> Title, Name,*</fields>
<where>EnableVersioning AND NOT Hidden</where>
</aListCollection>