Profiles

A profile is a context in which an Arcade expression is evaluated and understood. They expect specific inputs and output types depending on the use case.

See below for a detailed explanation of the profiles and how they are used.

Alias

The alias profile allows the map author to write an expression to evaluate a numeric value and return a text alias representing that value.

When the alias is needed, the script will be evaluated. It will be passed the value for which an alias is desired. It is expected that the script returns a text value, comprising the alias to be shown.

Globals

Variable Name Type Description
$value Number The numeric value for which a text alias is desired.

Return types

Text

Attribute Rules

The following profiles are designed for Attribute Rules.

Evaluation of batch calculation and validation rules is available at ArcGIS Enterprise 10.7 or later.

Attribute Rule Calculation

Since version: 1.5

With the Attribute Rule Calculation profile, expressions can be written to update field values based on expression logic. This profile is used for calculation attribute rules tools in ArcGIS Pro. When the attribute rule is evaluated for a dataset, the return value for the expression 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.

Globals

Variable Name Type Description Since version
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature executing the script. 1.5
$editcontext.editType Text Indicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable). 1.10
$feature Feature The feature being calculated. 1.5
$originalFeature Feature The previous state of the feature being calculated. 1.9
$featureSet FeatureSet A collection of features in the same table as the $feature evaluating the expression. 1.13

Return types

Number | Text | Date | Dictionary

For a list of valid dictionary keywords, click here.

Examples of this profile in context

Attribute Rule Constraint

Since version: 1.5

With the Attribute Rule Constraint profile, expressions can be written to evaluate whether or not a feature meets the criteria defined in the expression. This profile is used for constraint attribute rules in ArcGIS Pro. The script should return a Boolean with true indicating the feature meets the constraint criteria or false indicating it does not meet the criteria. You can also return a custom error message by returning a Dictionary of errorMessage.

Globals

Variable Name Type Description Since version
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature executing the script. 1.5
$editcontext.editType Text Indicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable). 1.10
$feature Feature The feature being evaluated for the constraint. 1.5
$originalFeature Feature The previous state of the feature being evaluated. 1.9
$featureSet FeatureSet A collection of features in the same table as the $feature evaluating the expression. 1.13

Return types

Boolean | Dictionary

For a list of valid dictionary keywords, click here.

Examples of this profile in context

Attribute Rule Validation

Since version: 1.5

With the Attribute Rule Validation profile, expressions can be written to evaluate whether or not a feature meets the criteria defined in the expression. This profile is used for validation attribute rules in ArcGIS Pro. The script should return a Boolean with true indicating the feature meets the validation criteria or false indicating it does not meet the criteria.

Globals

Variable Name Type Description Since version
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature executing the script. 1.5
$editcontext.editType Text Indicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable). 1.10
$feature Feature The feature being evaluated for the constraint. 1.5
$originalFeature Feature The previous state of the feature being evaluated. 1.9
$featureSet FeatureSet A collection of features in the same table as the $feature evaluating the expression. 1.13

Return types

Boolean | Dictionary

For a list of valid dictionary keywords, click here.

Examples of this profile in context

Validation attribute rule examples in ArcGIS Pro

Constraint

Since version: 1.6

With the Constraint profile, expressions can be written to evaluate whether or not a feature meets the criteria defined in the expression. This profile is used for advanced attribute editing in the ArcGIS API for JavaScript. The script should return a Boolean with true indicating the feature meets the constraint criteria or false indicating it does not meet the criteria.

Globals

Variable Name Type Description
$feature Feature The feature being evaluated for the constraint.

Return types

Boolean

Examples of this profile in context

Dashboard

The following profiles are designed for ArcGIS Dashboards.

Dashboard Formatting

Since version: 1.11

The Dashboard Formatting profile is used for the indicator, list, and table elements in ArcGIS Dashboards. An expression can be written to customize the way elements render data points. It is expected that the script returns a dictionary of name-value pairs specific for the element.

Globals

Variable Name Type Description Since version
$datapoint Feature | Dictionary The data point being evaluated for the visual element. Applies to indicator, list, and table elements. 1.11
$reference Dictionary The reference value being evaluated for the visual element. Applies to the indicator element. 1.11
$rowindex Number The position of a row in the table (zero based). Applies to the table element. 1.16

Return types

Dictionary

For a list of valid dictionary keywords, click here.

Note: The dashboard formatting profile does not support FeatureSets and geometry functions.

Dashboard Data

Since version: 1.13

The Dashboard Data profile is used to create FeatureSets in ArcGIS Dashboards. Users can author data expressions to build FeatureSets that unlock insights and build robust visualizations. These expressions can be used as a data source for one or more data driven elements.

Note: This profile does not expose any global variables.

Return types

FeatureSet

Dictionary Renderer

Since version: 1.11

The dictionary renderer profile allows the author of a dictionary renderer style to write an expression that evaluates to a text value used to construct a symbol. The string contains semi-colon separated style item keys as well as the primitive overrides used to override specific aspects of the symbol. See the Dictionary Renderer Toolkit for specifics on expected return values. When the feature is to be drawn, the script will be evaluated. The returned value will then be processed by looking up symbols by key from the dictionary and overriding them where specified.

Globals

Variable Name Type Description
$feature Feature The feature which is to be drawn on the map.
$config Dictionary A dictionary of configuration values.

Return types

Text

Examples of this profile in context

Feature Z

Since version: 1.5

In the Feature Z profile, expressions can be written to calculate z values for features in a 3D scene or to define the draw order for sorting features in a 2D map view. This is useful in datasets where z information is stored in an attribute instead of the feature's geometry. You can use this profile to return the attribute in lieu of a missing z value. Expressions in this profile must return a Number representing the Z coordinate of the geometry.

Globals

Variable Name Type Description
$feature Feature The feature requiring a Z value.

Return types

Number

Examples of this profile in context

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.

Globals

Variable Name Type Description Since version
$feature Feature The feature being calculated. 1.5
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature executing the calculation. 1.5

Return types

Date | Number | Text

Field Mapping

Since version: 1.7

With the field mapping profile, expressions can be written to define a field map between source and target layers. The field map is used by the transfer attribute tool, copy/paste attributes and other editing tools where a field map can be specified.

Globals

Variable Name Type Description
$sourcefeature Feature The source feature for the field map.
$targetfeature Feature The target feature for the field map.
$sourcelayer FeatureSet A collection of features in the same layer as $sourcefeature.
$targetlayer FeatureSet A collection of features in the same layer as $targetfeature.
$map FeatureSetCollection A collection of layers in the map of the executing arcade expression.
$sourcedatastore FeatureSetCollection A collection of layers in the same datastore as the $sourcelayer.
$targetdatastore FeatureSetCollection A collection of layers in the same datastore as the $targetlayer.

Return types

Dictionary

Form Calculation

Since version: 1.17

With the Form Calculation profile, expressions can be written to update a form value based on expression logic. This profile is used when defining form calculations in Field Maps. 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.

Globals

Variable Name Type Description
$feature Feature Exposes the feature's attributes for use in the calculation.
$originalFeature Feature The previous state of the feature being calculated.
$editcontext.editType Text Indicates whether the edit event is INSERT, UPDATE, DELETE, or NA (not applicable).
$layer FeatureSet A collection of features in the same layer as $feature.
$datastore FeatureSetCollection A collection of layers in the same feature service or database as $feature.
$featureSet FeatureSet A collection of features in the same table as $feature.
$map FeatureSetCollection A collection of feature service layers in the same map as $feature.

Return types

Date | Number | Text

GeoAnalytics

Since version: 1.7

The GeoAnalytics profile allows analysts to use expressions as input parameters to GeoAnalytics tools. These expression parameters are used in selected GeoAnalytics tools to calculate field values, detect incidents, buffer features, and more. This profile is only used in GeoAnalytics tools.

Globals

Variable Name Type Description
$feature Feature The feature being calculated.

Return Types

Number | Text | Date

Geotrigger Notification

Since version: 1.14

With the Geotrigger Notification profile, expressions control the information reported when a Geotrigger condition is met. For example, you can write an expression to customize a message displayed to a user when they enter a particular area of interest. Note that this profile does not check the condition itself - it simply reports that the event occurred.

This profile is used for configuring Geotrigger conditions in ArcGIS Runtime. Whenever Runtime detects that a Geotrigger condition has been met, the notification rule is evaluated. The expression's return value can contain a custom message which uses attributes and geometry of the user's device location and the area or fence that they entered or exited.

Globals

Variable Name Type Description
$feedfeature Feature The input feature (e.g. a device location or a feature) which caused the Geotrigger to be activated.
$fencefeature Feature The fence feature (e.g. an area of interest) which was entered or exited and caused the Geotrigger to be activated.
$fencenotificationtype Text A description of the event that occurred - either "entered" or "exited".

Note that, when the $feedfeature represents a device location, it includes position and metadata of the device - usually obtained from GPS. The feature has a Geometry (usually a point) and a fixed schema with the following properties:

Property Type Description
course Number The course of the location in degrees clockwise, 0 being true North.
horizontalaccuracy Number The horizontal accuracy of the location in meters.

Return Type(s)

Text | Dictionary

If the return type is Text this will be used as the notification message. You can use the Dictionary return type to include further details for your specific workflow but you should include the key message in order to populate the notification message.

Examples of this profile in context

Labeling

The labeling profile allows the map author to write an expression that determines the label to show on the map for each feature. The script evaluates for each label as it is to be drawn. It is expected that the script returns a text value, comprising the label to be drawn.

Globals

Variable Name Type Description
$feature Feature The feature whose label is to be drawn on the map.

Return types

Text

Examples of this profile in context

Layout

Since version: 1.11

The layout profile allows the map author to write an expression that evaluates to a value to be used in a layout dynamic text element. When the layout draws, the script will be evaluated. It is expected that the script returns a text value.

Globals

Variable Name Type Description
$feature Feature The feature whose values may be displayed in the layout.

Return types

Text

Examples of this profile in context

Location Update Constraint

Since version: 1.16

The Location Update Constraint profile allows the map author to write an expression that evaluates whether a new location should be used or not. For example, when location updates are received from a GPS device, the expression may reject location updates with a very poor horizontal accuracy. This profile is used for filtering location updates when working with Geotriggers in ArcGIS Runtime. The script should return a Boolean with true indicating the location meets the constraint criteria or false indicating it does not meet the criteria.

Globals

Variable Name Type Description
$locationupdate Feature The location update feature (e.g. from GPS) being evaluated for the constraint.

Note that, when the $locationupdate feature represents a device location, it includes position and metadata of the device - usually obtained from GPS. The feature has a Geometry (usually a point) and a fixed schema with the following properties:

Property Type Description
course Number The course of the location in degrees clockwise, 0 being true North.
horizontalaccuracy Number The horizontal accuracy of the location in meters.
verticalaccuracy Number The vertical accuracy of the location in meters.
velocity Number The velocity of the location in meters per second.

Examples of this profile in context

The following expression rejects location updates when the horizontal accuracy is over 20 meters:

$locationupdate.horizontalaccuracy <= 20

Measure Visualization

Since version: 1.7

The measure visualization profile allows the map author to write an expression that evaluates to a value used to drive the visualization of measure values along a line. This is used in the context of linear referencing hatching of m-aware lines. When each measure value is drawn, the measure value is interpolated for the marker location and passed into the script. It is expected that the script returns the desired value to draw via a text graphic in a marker symbol.

Globals

Variable Name Type Description
$measure Number The interpolated M-value for the marker location.
$feature Feature The feature which is to be drawn on the map.
$view.scale Number Returns the scale of the map at the time the expression evaluates.

Return types

Text | Number

Examples of this profile in context

Popups

The following profiles are designed for creating attributes and content elements in popups for both layer popups and feature reduction popups.

Since version: 1.1

In the popup profile, map authors can write expressions that return values (i.e. attributes) for display in the view's popup. Expressions can be referenced in the popup content's text template, field tables, and media charts. When the popup displays, the script will execute using the feature's attributes as variables in the expression. The script should return either text or a number and place it in the table cell or text comprising the popup's content. Values returned for charts will be used as the basis for the data-driven chart.

Globals

Variable Name Type Description Since version
$feature Feature Provides access to the attributes and geometry of the feature whose popup is to be displayed in the view. In feature reduction popups, this provides access to aggregate fields, such as $feature.cluster_count and any other fields used by the layer (e.g. $feature.cluster_avg_population). 1.1
$layer FeatureSet A collection of features in the same layer as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers. 1.1
$map FeatureSetCollection A collection of layers in the same map as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers. 1.1
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers. 1.1
$aggregatedFeatures FeatureSet Only applicable to feature reduction popups. A FeatureSet containing all the features represented by the cluster or bin. 1.15

Return types

Text | Number

Examples of this profile in context

Since version: 1.16

The popup element profile allows map authors to write expressions that return a dictionary representing either a rich text, fields table, or media (i.e. a chart or an image) popup element. The returned dictionary must follow the Web Map Specification for a popupElement. When the popup opens, the expression will execute using the feature's attributes as variables. The app executing the expression will render the popup element as defined by the expression.

Unlike the Popup profile, this profile allows popup authors to return multiple values within a single element.

Globals

Variable Name Type Description
$feature Feature Provides access to the attributes and geometry of the feature whose popup is to be displayed in the view. In feature reduction popups, this provides access to aggregate fields, such as $feature.cluster_count and any other fields used by the layer (e.g. $feature.cluster_avg_population).
$layer FeatureSet A collection of features in the same layer as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers.
$map FeatureSetCollection A collection of layers in the same map as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers.
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature whose popup is displayed in the view. In ArcGIS Online, this only applies to feature service layers.
$aggregatedFeatures FeatureSet Only applicable to feature reduction popups. A FeatureSet containing all the features represented by the cluster or bin.

Return types

Dictionary

See the Web Map Specification for popupElement for a list of properties required for constructing a valid popup element dictionary.

Examples of this profile in context

Tasks

Since version: 1.15

With the Tasks profile, ArcGIS Pro Tasks authors can write verification actions to evaluate whether or not a selection of features meets the criteria defined in the expression. Tasks verification actions prevent the user from proceeding to the next step based on evaluation of the provided expression. The script should return a Boolean with true indicating the feature meets the verification criteria or false indicating it does not meet the criteria.

Globals

Variable Name Type Description
$feature Feature The feature being evaluated by the task.
$datastore FeatureSetCollection A collection of layers in the same feature service or database as the $feature being evaluated by the task.

Return types

Boolean

Velocity

Since version: 1.12

The Velocity profile allows analysts to use expressions as input parameters to real-time and big data analytics tools. These expression parameters are used in selected tools to calculate field values, enrich features, detect incidents, buffer features, and more. This profile is only used in ArcGIS Velocity.

Globals

Variable Name Type Description
$feature Feature In analytic tools with single inputs, the feature being calculated, evaluated or operated upon.
$target Feature In analytic tools with two inputs, the feature being evaluated for filtering or enrichment.
$join Feature In analytic tools with two inputs, the feature supplying values for evaluation or enrichment of the target feature.
$analytic Dictionary Time values associated with the analytic such as start time, last end time, etc.

Return types

Boolean | Date | Geometry | Number | Text

Visualization

The visualization profile allows the map author to write an expression that evaluates to a value used to drive the visualization. This could be used for a visual variable such as size, or as a value in a class breaks renderer. When the feature is to be drawn, the script will be evaluated. It is expected that the script returns a value specific to the rendering property being calculated (e.g. A number for a class breaks visualization or text for a unique value visualization).

Globals

Variable Name Type Description
$feature Feature The feature which is to be drawn on the map.
$view.scale Number Returns the scale of the map at the time the expression evaluates.

Return types

Text | Number

Examples of this profile in context

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