SPDataSource Fields for Webs & ListsOfLists

The List, ListItem and CrossList modes of SPDataSource are well documented, but the Webs and ListOfLists modes have more or less gone unnoticed. So as of WSS 3.0 SP1, here’s a complete list of fields for these modes, many of which map to internal properties of SPWeb and SPList.

SPDataSourceMode.Webs

Field Type Internal?
__spAllowAnonymousAccess Boolean
__spAllowGlobalCatalog Boolean Y
__spAllowP2P Boolean Y
__spAlternateCssUrl String
__spAlternateHeader String
__spCanAddDeleteWebParts Boolean Y
__spCanCustomizePages Boolean Y
__spCanPersonalizeWebParts Boolean Y
__spConfiguration Int16
__spCreated DateTime
__spCurrencyLocaleID Int32
__spCustomizationMode Boolean Y
__spCustomJSUrl String Y
__spDefaultUrl String Y
__spDescription String
__spEffectivePresenceEnabled Boolean
__spEmailInsertsEnabled Boolean
__spEventHandlersEnabled Boolean
__spExecuteUrl String
__spExists Boolean
__spExternalSecurityProviderSetting String
__spHasExternalSecurityProvider Boolean
__spHasUniquePerm Boolean
__spHasUniqueRoleAssignments Boolean
__spHasUniqueRoleDefinitions Boolean
__spID Guid
__spIgnoreCheckOutLock Boolean Y
__spIncludeSupportingFolders Boolean
__spIsADAccountCreationMode Boolean
__spIsADEmailEnabled Boolean
__spIsParsingWebPartPage Boolean Y
__spIsRootWeb Boolean
__spLanguage UInt32
__spLastItemModifiedDate DateTime
__spMasterUrl String
__spCustomMasterUrl String
__spMeetingCount Int16 Y
__spName String
__spParentWebId Guid
__spPersonalizationMode Boolean Y
__spPortalMember Boolean
__spPortalName String
__spPortalSubscriptionUrl String
__spPortalUrl String
__spPresenceEnabled Boolean
__spPublicFolderRootUrl String
__spServerNow DateTime Y
__spServerRelativeUrl String
__spSyndicationEnabled Boolean
__spTheme String
__spThemeCssUrl String
__spTitle String
__spUrl String
__spUserInfoListId Guid Y
__spUserIsSiteAdmin Boolean
__spUserIsWebAdmin Boolean
__spViewMode Boolean Y
__spWebTemplate String
__spWebTemplateId Int32

SPDataSourceMode.ListOfLists

Field Type Internal?
__spAllowContentTypes Boolean
__spAllowDeletion Boolean
__spAllowMultiResponses Boolean
__spCanReceiveEmail Boolean
__spContentTypesEnabled Boolean
__spCreated DateTime
__spDefaultViewUrl String
__spDescription String
__spDirection String
__spEmailAlias String
__spEnableAssignToEmail Boolean
__spEnableAttachments Boolean
__spEnableMinorVersions Boolean
__spEnableModeration Boolean
__spEnableSyndication Boolean
__spEnableVersioning Boolean
__spEventSinkAssembly String
__spEventSinkClass String
__spEventSinkData String
__spExcludeFromTemplate Boolean
__spFlags UInt64 Y
__spForceCheckout Boolean
__spHasExternalEmailHandler Boolean
__spHasUniqueRoleAssignments Boolean
__spHidden Boolean
__spID Guid
__spImageUrl String
__spInternalName String Y
__spItemCount Int32
__spLastItemDeletedDate DateTime
__spLastItemModifiedDate DateTime
__spMultipleDataList Boolean
__spOnQuickLaunch Boolean
__spOrdered Boolean
__spParentWebUrl String
__spPropertiesXml String
__spReadSecurity Int32
__spRootFolderUrl String Y
__spSchemaXml String
__spSendToLocationName String
__spSendToLocationUrl String
__spShowUser Boolean
__spTitle String
__spVersion Int32
__spWriteSecurity Int32

5 Responses to “SPDataSource Fields for Webs & ListsOfLists”

  1. Robin Says:

    Keith,

    thanks for this one! Saved me some time :)

    Robin

  2. Dave Barrows Says:

    Hi Keith,

    Is there a way to programmatically access the data of the SPDataSource without having to bind it to a web control? Most examples I’ve seen have people writing declarative or object model code that uses SPDataSource (naturally) as the data source to populate a drop-down list or some other GUI control. But I’d like to be able to query the data that’s returned, either by binding it to an array or some other non-GUI type-object, or without having to create some front-end object at all. Is that possible as far as you’re aware? (As a workaround I’m creating a drop-down list programmatically then doing a FindByText or FindByValue on that object, but… it’s a bit of a kludge). Any thoughts appreciated, thanks, -Dave

    • Keith Dahlby Says:

      SPDataSource.GetView() returns an SPDataSourceView from which you should be able to Select() the data. This SO question has some code that looks like it should work, noting the dependency on SPContext.

      Hope this helps ~
      Keith

  3. Dave Barrows Says:

    thanks very much, cheers,
    Dave


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: