arcadeUtils

AMD: require(["esri/layers/support/arcadeUtils"], (arcadeUtils) => { /* code goes here */ });
ESM: import * as arcadeUtils from "@arcgis/core/layers/support/arcadeUtils.js";
Object: esri/layers/support/arcadeUtils
Since: ArcGIS Maps SDK for JavaScript 4.25

Contains convenience methods for getting Arcade expressions defined on a layer.

Method Overview

Name Return Type Summary Object

Returns all Arcade expressions defined on a given layer and provides metadata describing the context for which each expression was authored.

arcadeUtils

Method Details

getExpressionsFromLayer

Method
getExpressionsFromLayer(layer){ExpressionInfo[]}

Returns all Arcade expressions defined on a given layer and provides metadata describing the context for which each expression was authored.

Known Limitations

Expressions set in the following places will not be returned from this method.

Returns
Type Description
ExpressionInfo[] Resolves to an array of objects containing all the Arcade expressions defined on the input layer along with metadata describing the context in which each expression was defined.

Type Definitions

ExpressionInfo

Type Definition
ExpressionInfo

Represents the result of the getExpressionsFromLayer method. Contains an Arcade expression, along with metadata about the context in which the expression was defined.

Properties
expression String

An Arcade expression defined on a layer.

name String
optional

The name of the expression used when referencing it in popup and form templates.

title String
optional

The expression's title, describing it in the legend and other UI elements.

profileInfo Object

Information about the profile, or environment, where the expression was defined.

Specification
name String

Indicates which profile is used to execute the expression.

Possible Values:"aggregate-field"|"form-constraint"|"feature-z"|"field-calculation"|"form-calculation"|"labeling"|"popup"|"popup-element"|"feature-reduction-popup"|"feature-reduction-popup-element"|"visualization"

context ProfileContext

Describes the context (i.e. the API class) where the expression was defined.

source String

Indicates the data source used to hydrate the expression's profile variables.

Possible Values:"layer"|"feature-reduction"

returnType String
optional

The return type of the expression. This is typically set in popup expressions for formatting purposes.

Possible Values:"boolean"|"date"|"number"|"string"|"dictionary"

FeatureZProfileContext

Type Definition
FeatureZProfileContext String

Describes the context for which an Arcade expression was defined using the Feature Z profile.

Possible Values:"order-by" |"elevation-info"

PopupProfileContext

Type Definition
PopupProfileContext String

Describes the context for which an Arcade expression was defined using the popup or popup element profile.

Possible Values:"popup-template" |"popup-expression-content"

ProfileContext

Type Definition
ProfileContext VisualizationProfileContext |PopupProfileContext |FeatureZProfileContext |String

Describes the context for which an Arcade expression was defined.

Possible Values:VisualizationProfileContext |PopupProfileContext |FeatureZProfileContext |"label-class" |"form-template" |"aggregate-field"

VisualizationProfileContext

Type Definition
VisualizationProfileContext String

Describes the context for which an Arcade expression was defined using the visualization profile.

Possible Values:"unique-value-renderer" |"class-breaks-renderer" |"dot-density-renderer" |"heatmap-renderer" |"pie-chart-renderer" |"color-variable" |"size-variable" |"opacity-variable" |"rotation-variable"

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