SPField class

A field represents the data model for a column in SharePoint list view.

Remarks

This is the client-side equivalent for SharePoint SPField class. It is used with the @microsoft/sp-listview-extensibility package.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the SPField class.

Properties

clientSideComponentId

The unique identifier of the client-side component associated with the field.

clientSideComponentProperties

This property is only used when a ClientSideComponentId is specified. It is optional.

displayName

The display name of the field. This name is shown as column name in UI.

fieldType

The type of the field represented as a string

id

The GUID identifier for this field.

internalName

The internal name of the field. This name is usually used to find the field.

isRequired

Whether the field is required for each list item in the list

Property Details

clientSideComponentId

The unique identifier of the client-side component associated with the field.

readonly clientSideComponentId: Guid | undefined;

Property Value

Guid | undefined

clientSideComponentProperties

This property is only used when a ClientSideComponentId is specified. It is optional.

readonly clientSideComponentProperties: string;

Property Value

string

Remarks

If non-empty, the string must contain a JSON object with custom initialization properties whose format and meaning are defined by the client-side component.

displayName

The display name of the field. This name is shown as column name in UI.

readonly displayName: string;

Property Value

string

fieldType

The type of the field represented as a string

readonly fieldType: string;

Property Value

string

id

The GUID identifier for this field.

readonly id: Guid;

Property Value

internalName

The internal name of the field. This name is usually used to find the field.

readonly internalName: string;

Property Value

string

isRequired

Whether the field is required for each list item in the list

readonly isRequired: boolean;

Property Value

boolean