Field Calculation

Since version: 1.5

With the Field Calculation profile, expressions can be written to update a field value based on expression logic. This profile is used in field calculation tools in ArcGIS Pro, ArcGIS Enterprise, and ArcGIS Online. When the script is evaluated, the return value is cast to the field type of the output value. It is best practice to handle casting within the script for full control of casting behavior to Number, Date, or Text return types.

Context

This profile was created for use in the following contexts:

Profile variables

Variable NameTypeDescriptionSince version
$featureFeatureThe feature being calculated.1.5
$datastoreFeatureSetCollectionA collection of layers in the same feature service or database as the $feature executing the calculation.1.5

Function bundles

Core | Geometry | Data Access | Portal Access

Return types

Date | Number | Text

Example

The following example concatenates text values from existing fields to create a new text field.

Use dark colors for code blocksCopy
 
1
Concatenate($feature.room, $feature.floor)

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.