Resource: CalculatedFieldDefinition
Represents a Calculated Field Definition.
| JSON representation |
|---|
{ "name": string, "displayName": string, "description": string, "calculationType": enum ( |
| Fields | |
|---|---|
name |
Identifier. The resource name of the CalculatedFieldDefinition. Format: projects/{project}/locations/{location}/instances/{instance}/calculatedFieldDefinitions/{calculatedFieldDefinition} |
displayName |
Required. User-friendly display name. Must be unique within the instance. |
description |
Optional. Optional description. |
calculationType |
Required. Type of calculation. |
formulaExpression |
Required. The raw formula string. |
outputType |
Required. Expected output type of the formula. Examples: TEXT, INTEGER, BOOLEAN, TIMESTAMP, ARRAY_TEXT |
targetField |
Required. The name of the field where the result is stored. e.g. case.priority |
enabled |
Optional. Whether the calculated field is enabled. Defaults to true. |
dependentFields[] |
Output only. The fields that this definition depends on. Populated by the backend. |
CalculationType
Enum for Calculation Type.
| Enums | |
|---|---|
CALCULATION_TYPE_UNSPECIFIED |
Default value. This value is unused. |
SET_VALUE |
The formula sets a value on the target field. |
OutputType
Enum for Output Type.
| Enums | |
|---|---|
OUTPUT_TYPE_UNSPECIFIED |
Default value. This value is unused. |
OUTPUT_TYPE_TEXT |
The output type is Text. |
OUTPUT_TYPE_INTEGER |
The output type is Integer. |
OUTPUT_TYPE_BOOLEAN |
The output type is Boolean. |
OUTPUT_TYPE_TIMESTAMP |
The output type is Timestamp. |
OUTPUT_TYPE_ARRAY_TEXT |
The output type is Array of Text. |
Methods |
|
|---|---|
|
Create a CalculatedFieldDefinition. |
|
Delete a CalculatedFieldDefinition. |
|
Searches for fields available to be used as a TargetFieldName for a new Calculated Field. |
|
Get Dynamic Options for a target field based on Calculated Field definitions. |
|
Get a CalculatedFieldDefinition. |
|
List CalculatedFieldDefinitions. |
|
Update a CalculatedFieldDefinition. |
|
Validate a potential dependency for a Calculated Field formula. |