共用方式為


SP.Field Properties

Applies to: SharePoint Foundation 2010

The following table lists the properties of the SP.Field class.

Properties

Name

Description

canBeDeleted

Gets a value that specifies whether the field can be deleted.

defaultValue

Gets or sets a value that specifies the default value for the field.

description

Gets or sets a value that specifies the description of the field.

direction

Gets or sets a value that specifies the reading order of the field.

enforceUniqueValues

Gets or sets a value that specifies whether to require unique field values in a list or library column.

fieldTypeKind

Gets or sets a value that specifies the type of the field.

filterable

Gets a value that specifies whether list items in the list can be filtered by the field value.

fromBaseType

Gets a Boolean value that indicates whether the field derives from a base field type.

group

Gets or sets a value that specifies the field group.

hidden

Gets or sets a value that specifies whether the field is hidden in list views and list forms.

id

Gets a value that specifies the field identifier (ID).

internalName

Gets a value that specifies the field internal name.

readOnlyField

Gets or sets a value that specifies whether the value of the field is read-only.

required

Gets or sets a value that specifies whether the field requires a value.

schemaXml

Gets or sets a value that specifies the XML schema that defines the field.

scope

Gets a value that specifies the server-relative URL of the list or the site to which the field belongs.

sealed

Gets a value that specifies whether properties on the field cannot be changed and whether the field cannot be deleted.

sortable

Gets a value that specifies whether list items in the list can be sorted by the field value.

staticName

Gets or sets a value that specifies a customizable identifier (ID) of the field.

title

Gets or sets value that specifies the display name of the field.

typeAsString

Gets or sets a value that specifies the type of the field.

typeDisplayName

Gets a value that specifies the display name for the type of the field.

typeShortDescription

Gets a value that specifies the description for the type of the field.

validationFormula

Gets or sets a value that specifies the data validation criteria for the value of the field.

validationMessage

Gets or sets a value that specifies the error message returned when data validation fails for the field.

Applies To

SP.Field Class

See Also

Reference

SP.Field Methods

SP Namespace