require(["esri/layers/support/arcadeUtils"], (arcadeUtils) => { /* code goes here */ });
import * as arcadeUtils from "@arcgis/core/layers/support/arcadeUtils.js";
esri/layers/support/arcadeUtils
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
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.
Parameterlayer CSVLayer|FeatureLayer|GeoJSONLayer|Sublayer|OGCFeatureLayer|SceneLayer|WFSLayer|OrientedImageryLayer|CatalogFootprintLayer|KnowledgeGraphSublayerThe layer from which to get all Arcade expressions.
ReturnsType 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
-
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 StringThe name of the expression used when referencing it in popup and form templates.
title StringThe expression's title, describing it in the legend and other UI elements.
profileInfo ObjectInformation 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 ProfileContextDescribes the context (i.e. the API class) where the expression was defined.
source StringIndicates the data source used to hydrate the expression's profile variables.
Possible Values:"layer"|"feature-reduction"
returnType StringThe return type of the expression. This is typically set in popup expressions for formatting purposes.
Possible Values:"boolean"|"date"|"number"|"string"|"dictionary"
-
FeatureZProfileContext
FeatureZProfileContext String
-
Describes the context for which an Arcade expression was defined using the Feature Z profile.
Possible Values:"order-by" |"elevation-info"
-
PopupProfileContext
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
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
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"