SPAddFieldOptions Enumeration

An enumerated list of options that can be applied when a new field is added to a list.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableTypeAttribute(Name := "AddFieldOptions", ServerTypeId := "{2b6ef6c5-00b4-48ef-bc7c-2db4eb650057}")> _
<FlagsAttribute> _
<SubsetCallableTypeAttribute> _
Public Enumeration SPAddFieldOptions
'Usage
Dim instance As SPAddFieldOptions
[ClientCallableTypeAttribute(Name = "AddFieldOptions", ServerTypeId = "{2b6ef6c5-00b4-48ef-bc7c-2db4eb650057}")]
[FlagsAttribute]
[SubsetCallableTypeAttribute]
public enum SPAddFieldOptions

Members

Member name Description
Default Set to a constant decimal value of 0. Same as AddToDefaultContentType.
AddToDefaultContentType Set to a constant decimal value of 1. Used to specify that a new field that is added to the list is also be added to the default content type in the site collection.
AddToNoContentType Set to a constant decimal value of 2. Used to specify that a new field is not be added to any content type. (If AddFieldToDefaultView or AddToAllContentTypes is set, either or both overrule this setting.)
AddToAllContentTypes Set to a constant decimal value of 4. Used to specify that a new field that is added to the specified list is also be added to all content types in the site collection.
AddFieldInternalNameHint Set to a constant decimal value of 8. Used to add an internal field name hint for the purpose of avoiding possible database locking or field renaming operations.
AddFieldToDefaultView Set to a constant decimal value of 16. Used to specify that a new field that is added to the specified list is also be added to the default list view.
AddFieldCheckDisplayName Set to a constant decimal value of 32. Used to confirm that no other field has the same display name.

See Also

Reference

Microsoft.SharePoint Namespace