Share via


SPFieldCalculated.Formula Property

Gets or sets the formula that is used for calculation in the field.

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

Syntax

'Declaration
<ClientCallableAttribute> _
<ClientCallableConstraintAttribute(FixedId := "1", Type := ClientCallableConstraintType.NotEmpty)> _
Public Property Formula As String
    Get
    Set
'Usage
Dim instance As SPFieldCalculated
Dim value As String

value = instance.Formula

instance.Formula = value
[ClientCallableAttribute]
[ClientCallableConstraintAttribute(FixedId = "1", Type = ClientCallableConstraintType.NotEmpty)]
public string Formula { get; set; }

Property Value

Type: System.String
The formula.

Remarks

Formulas are in the format of Microsoft Excel, but there are some limitations on the functions you can use and some subtleties in the syntax. Before using this property consult Calculated Field Formulas.

See Also

Reference

SPFieldCalculated Class

SPFieldCalculated Members

Microsoft.SharePoint Namespace