SPFieldCalculated Class

The SPFieldCalculated class represents a calculated field in a list.

System.Object

   Microsoft.SharePoint.SPField

      Microsoft.SharePoint.SPFieldCalculated

Public Properties

The following table shows the public properties of the SPFieldCalculated class, the data type of each property, and a brief description of each.

Name Data Type Description
Currency Microsoft.SharePoint.SPCurrencyFieldFormats Gets or sets the currency format that is used in the field.
DateFormat Microsoft.SharePoint.SPDateTimeFieldFormatType Gets or sets the date and time format that is used in the field.
DisplayFormat Microsoft.SharePoint.SPNumberFormatTypes Gets or sets the number format that is displayed in the field.
Formula String Gets or sets the formula used for calculation in the field.
OutputType Microsoft.SharePoint.SPFieldType Gets or sets how field values are formatted in the field.
ShowAsPercentage Boolean Gets or sets a Boolean value that determines whether values in the field are displayed as a percentage.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.

Remarks

Setting properties of the SPFieldCalculated class requires that the Update method be called for changes to take effect in the database.

Requirements

Namespace: Microsoft.SharePoint

Platforms: Microsoft Windows Server 2003

Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)

Security: Code Access Security