Version 1.28
(November 2024)
New profiles
Updated profiles
- Added
$view.time
to the Visualization profile.Properties
Version 1.27
(August 2024)
- Minor bug fixes and enhancements
Version 1.26
(February 2024)
New data types
New functions
Updated functions
Better support for checking nested dictionary, array, and geometry properties.
- DefaultValue
- HasValue
Added side
output to the following functions:
Updated profiles
- The Popup and Popup Element profiles added two new profile variables:
$user
andInput $graph
.
Version 1.25
(December 2023)
New functions
Version 1.24
(October 2023)
New data types
New functions
Updated functions
The following functions were updated with new signatures:
- Date(year, month, day, hour?, minute?, second?, millisecond?, timeZone?) -> Date
- Date(dateOnlyValue, timeValue?, timeZone?) -> Date
- Date(dateValue) -> Date
- DateAdd(dateOnlyValue, addValue) -> DateOnly
- DateAdd(timeValue, addValue) -> Time
- DateDiff(date1, date2, units?, timeZone?) -> Number
- DateDiff(dateOnly1, dateOnly2, units?) -> Number
- DateDiff(time1, time2, units?) -> Number
The following functions have updated parameters:
- Day, Month, Year, Week, Weekday, ISOMonth, ISOWeek, ISOWeekday, and ISOYear now support DateOnly as an input parameter
- Hour, Minute, Second, and Millisecond now support Time as an input parameter
- Hash now supports DateOnly and Time values
- Text now supports additional formatting for time zones (Z,ZZ,ZZZ, etc)
New profiles
Updated profiles
Each profile page was updated to define how the default time zone of the execution context is determined.
Version 1.23
(June 2023)
New functions
- GetEnvironment - A debugging function that returns information about the execution context of the expression, including the version of Arcade executing the expression, the Arcade runtime engine, locale, and spatial reference for geometry functions.
- NearestCoordinate - Returns the nearest location and distance to an input geometry.
- NearestVertex - Returns the nearest vertex and distance to an input geometry.
Updated functions
The following functions were updated with new signatures.
- Array(inputArray, deep?) - Creates either a shallow or deep copy of an array.
- Dictionary(Feature/Geometry) - Casts a Feature or Geometry to Dictionary without having to first convert to JSON Text.
- Dictionary(inputDictionary, deep?) - Creates either a shallow or deep copy of a dictionary.
- Feature(inputGeometry, attributeDictionary) - Creates a Feature from a Geometry and dictionary of attributes.
- Feature(inputDictionary) - Creates a Feature from an input Dictionary without having to first convert to JSON Text.
- Feature(inputFeature) - Creates a copy of a feature.
Updated Types
- Attachment was updated to include
keywords
. - Number data values can be represented as binary, octal, and hexadecimal literal values.
Updated Playground
The playground was updated to a more modern UI. It introduces the following improvements from the previous playground:
- Intellisense. Get help for the following as you type:
- Arcade functions, including in-line documentation without having to open the right-hand panel.
- Profile variables and their values.
- Previously declared identifiers for functions and variables.
- Many commands and shortcuts to improve your efficiency. For example, there's a shortcut for formatting your expression, and another for changing all occurrences of a value.
- Better error warning and message reporting as you type.
- An enhanced debugging experience, especially when inspecting FeatureSet, Feature, Dictionary, and Geometry values in the output panel.
- Better syntax highlighting using high-contrast colorblind-safe colors conforming to WCAG 2.0 (1.4.3) contrast guidelines for users.
Version 1.22
(April 2023)
Updated profiles
- The following profile variables were added to the Form Constraint profile:
$original
,Feature $editcontext.edit
,Type $layer
,$datastore
,$feature
, andSet $map
. Additionally, the profile now supports the Data Access and Portal Access function bundles.
Version 1.21
(February 2023)
Updated profiles
- The Constraint profile was renamed to Form Constraint.
- The Dashboard Formatting profile was split into three separate profiles: Dashboard Indicator Formatting, Dashboard List Formatting, and Dashboard Table Formatting
Bug fixes
- Timestamp - Fixed a bug where calling
Timestamp
for any date value resulted in incorrectly returning a date and time in UTC where the epoch was shifted based on the offset of the local time zone. Now the epoch for the output date correctly represents the current date and time in UTC. - ToLocal - Fixed a bug where calling
To
for any date value resulted in modifying the date's epoch based on the offset of the local time zone from UTC. Now the epoch for the output date matches the epoch of the input date. The output date's time zone is the local or system time zone of the client.Local - ToUTC - Fixed a bug where calling
To
for any date value resulted in modifying the date's epoch based on the offset of the local time zone from UTC. Now the epoch for the output date matches the epoch of the input date. The output date's time zone is UTC.UTC
Version 1.20
(November 2022)
New functions
Updated functions
- GetUser no longer requires a portal parameter. If not provided, then user information for the active portal is returned.
New profiles
Updated profiles
- Velocity profile now accepts Track functions.
- Popup profiles now split into Feature Reduction Popup and popup.
Updated documentation
We reorganized the documentation and added new content to clarify language features, syntax, and profile and function definitions. The following are some of the highlights:
- Introduction - The introduction has been condensed to include a definition of what Arcade is, why it was developed, and where you use it.
- Language features - This is a brand new section that clarifies various Arcade language features and attempts to document them in a logical sequence starting with statements, and concluding with debugging tips. Some pages are new, though they describe language features that may have existed since the first release of Arcade, but weren't previously documented.
- Profiles - The profiles documentation previously existed on a single page. Now each profile has a dedicated page that documents profile variables (previously known as globals), return types, function bundles, example snippets, and the context where the profile is implemented.
- Function reference - Function reference pages were reorganized into more logical groups, mostly based on data type. Functions with multiple signatures or overloads are now separated into their appropriate sections. For example, Geometry functions that accept FeatureSet inputs now exist under FeatureSet functions.
- Function bundles - This is a new page that categorizes various function categories into bundles. Profiles define which function bundles are available in each Arcade profile. For example, all profiles include Core functions, but only a few include Data access functions.
Version 1.19
(August 2022)
New language features
while loops
Added support for while loops. The while
loop executes a block of code as long as the given condition is true.
Expects($feature, "*");
var prefix = "Year_";
var y = 1900;
var total = 0;
while(y <= 2020){
var fieldName = prefix + y;
if(HasKey($feature, fieldName)){
total += $feature[fieldName];
}
y+=10; // increment y so the while will eventually stop
}
return total;
Dictionary auto-keys
You can now access dictionary values using auto-keys. Auto-keys assign dictionary key values to Arcade variables with names matching the dictionary's keys.
var d = {
name: "Spokane",
POP_2020: 219185,
POP_2010: 208916
}
var { POP_2020, POP_2010 } = d;
return ((POP_2020 - POP_2010) / POP_2010) * 100; // returns 4.9
// +4.9% population change from 2010 - 2020
New functions
Updated functions
- FeatureSet can now be used to create a FeatureSet from a dictionary in addition to Text (JSON).
Version 1.18
(April 2022)
New functions
Version 1.17
(March 2022)
New profiles
Version 1.16
(December 2021)
New functions
Updated functions
- The Attachments function now includes a
metadata
option. Whentrue
, the function returns exif information for the attachments.
New profiles
Updated profiles
- The Field Calculate profile was renamed to Field Calculation.
Version 1.15
(September 2021)
New functions
New profiles
Updated profiles
The Attachments function can now be used in the Popup profile.
Version 1.14
(August 2021)
New functions
Updated functions
- All geometry functions now support
nautical-miles
as a valid unit. - GetUser was updated to return more information about the user by default when the portal is not provided. Note the updated payload for the following expression:
var u = getUser($featureset)
return text(u);
// payload at 1.14
{
"id" : <String> //user id
"username": <String> // username
"fullName": <String> // First Name + Last name
"email": <String> // email
"groups" -> <Array> // e.g. [ "Electric", "Water" ]`
"role" -> <String> // (Administrator, Publisher, User, Viewer or Custom Role)
"privileges" -> <Array> // Array of fine privileges (edit, view etc.. )
"userLicenseTypeExtensions" -> <Array> // ["Utility Network", "Parcel Fabric"]
}
// payload prior to 1.14
{
"username": <String> // username
}
New profiles
Version 1.13
(April 2021)
New functions
Updated functions
- Schema was updated to support
$feature
inputs in addition to FeatureSet inputs.
New profiles
- Dashboard data
- Dashboard formatting (renamed from
Dashboard
)
Updated profiles
Added $feature
global to Attribute Rules and Field Calculation profiles.
Version 1.12
(December 2020)
New functions
- Array
- Back
- Erase
- GdbVersion
- GetUser
- Hash
- Includes
- Insert
- ISOMonth
- ISOWeek
- ISOWeekday
- ISOYear
- Pop
- Push
- Resize
- Slice
- Splice
- TrackAccelerationAt
- TrackAccelerationWindow
- TrackCurrentAcceleration
- TrackCurrentDistance
- TrackCurrentSpeed
- TrackDistanceAt
- TrackDistanceWindow
- TrackSpeedAt
- TrackSpeedWindow
- ToHex
New profiles
Documentation enhancements
Images were added to the documentation of some geometry functions to clarify meaning. See Angle for an example.
Version 1.11
(July 2020)
The following features were added to ArcGIS Enterprise server 10.8.1, but not ArcGIS Enterprise portal 10.8.1. See version 1.10 for new features added to ArcGIS Enterprise portal 10.8.1.
Bitwise Operators
You can now use bitwise operators in Arcade expressions. The expression evaluates the operation based on the binary representation of numbers.
7 & 14
// binary 0111 & 1110, which results in 0110
// the expression will return 6
Template literals
Template literals allow for embedding expressions in text literals using the following syntax:
`Text is wrapped in backticks, and expressions ${ /* go inside curly braces preceded by a $ */ }.`
This allows for easier text manipulation in Arcade. For example, in Arcade 1.11 you can do this...
var textContent = `The average score was ${Round(Average(scores), 2)}%.`
...instead of text concatenation...
var textContent = "The average score was " + Round(Average(scores), 2) + "%".
Read the Template literals guide for more information and examples.
New functions
- Densify
- DensifyGeodetic
- Domain
- EnvelopeIntersects
- Generalize
- IsSimple
- Offset
- Relate
- Rotate
- Schema
- Simplify
- SubtypeCode
- SubtypeName
- Subtypes
New profiles
Version 1.10
(July 2020)
Updated functions
FeatureSetByAssociation was updated to include two additional association
types: junction
and midspan
.
Updated profiles
The following profiles added a new global, $editcontext.edit
, which indicates the type of edit (insert, update, delete) performed on the feature.
Version 1.9
(January 2020)
New functions
Updated profiles
The following profiles added a new global, $original
, which represents the original state of the feature executing the Arcade expression.
Version 1.8
(October 2019)
New functions
Updated functions
- Dictionary
- Added an additional signature that allows users to parse stringified JSON as an Arcade Dictionary.
- Distinct
- Added support for FeatureSet inputs.
- FeatureSetByPortalItem
- Now implemented in the Popup profile with a modified signature. You are now required to provide a reference to the portal where the item belongs.
Documentation updates
The function documentation now displays multiple signatures for functions that have overloaded parameters. This includes new documentation for the following functions:
Version 1.7
(July 2019)
New profiles
New functions
- Angle
- Bearing
- RingIsClockWise
- TrackCurrentTime
- TrackGeometryWindow
- TrackIndex
- TrackStartTime
- TrackWindow
- UrlEncode
Updated functions
The following functions were updated to support an array of points as inputs.
The following functions were updated to support FeatureSet inputs:
Bug fixes
- The parameter order of Contains and Within functions were updated to properly work for FeatureSets and standalone geometries.
Version 1.6
(March 2019)
New profiles
New functions
Version 1.5
(December 2018)
FeatureSet support in popups and attribute rules
FeatureSet is a new data type that gives you access to other features in the same layer, feature service, or map as the feature executing an Arcade expression. This functionality is only available in the Popup and Attribute Rule profiles.
We introduced three new global variables in these profiles:
$layer
- A FeatureSet containing all features in the same layer as the$feature
. This only applies to feature layers.$map
- A collection of layers in the same map as the$feature
.$datastore
- A collection of layers in the same feature service as the$feature
.
FeatureSets allow you to write expressions that return a result based on the feature's relationship with other features in the map. For example, you can compare the value of a feature's field to the statistics of the same field for all features in the layer.
// returns the difference between the feature's 'population' and the average value of `population` in the dataset
$feature.population - Mean($layer, 'population');
You can chain functions that support FeatureSet.
var sensitiveAreas = FeatureSetByName($map, 'Sensitive Land', ['LandType'], true);
var affectedLandPoly = Geometry($feature);
var countAreas = Count( Intersects( Filter( sensitiveAreas, "LandType='Arable'"), affectedLandPoly) );
You can also substitute Arcade variables in functions that take SQL92 expressions as a parameter using the @
character.
var averageValue = Average($layer, 'POPULATION');
var result = Filter($layer, 'POPULATION > @averageValue');
New profiles
- Attribute Rule Calculation
- Attribute Rule Constraint
- Attribute Rule Validation
- Feature Z
- Field Calculation
New functions
- FeatureSet()
- FeatureSetById()
- FeatureSetByName()
- FeatureSetByPortalItem()
- Filter()
- IsNan()
- OrderBy()
Existing functions that support FeatureSet
- Average()
- Contains()
- Crosses()
- Count()
- DomainCode()
- DomainName()
- First()
- Intersects()
- Max()
- Mean()
- Min()
- Overlaps()
- Relate()
- Stdev()
- Sum()
- Top()
- Touches()
- Variance()
- Within()
Deprecated functions
Relate()
Version 1.4
(July 2018)
Casting Feature to Geometry
For your convenience, we added support for internally casting features to geometries in all geometry functions. That means you can directly pass a feature (e.g. $feature
) to any parameter that
accepts Geometry types.
// At Arcade 1.4, you can pass a feature directly to any geometry
// function, which internally casts the feature as a geometry object
AreaGeodetic( $feature, 'square-meters' )
// This supersedes the previous workflow, which required you to
// cast the Feature to a Geometry yourself
// required syntax at Arcade 1.3
AreaGeodetic( Geometry($feature), 'square-meters' )
New profiles
Arcade expressions can now be executed in the following profiles:
These profiles allow you to write expressions for attribute rules in ArcGIS Pro.
New functions
Version 1.3
(December 2017)
Geometry operations
We added several new geometry functions that allow you to perform geometric operations in any of the following categories:
- Testing topological relationships
- Overlay
- Measurement
- Proximity
See the updated overview of Geometry Functions for more information and the new functions listed below.
Many of the geometry functions, such as the overlay and testing functions, require more than one input geometry. In the current release of Arcade, you can manually construct geometry objects as needed within the expression. For example, you can calculate the distance from one hard-coded point to all points in a layer. In a future release, we will provide methods that allow you to access other geometries within the same layer and features in other layers.
New functions
- Area()
- AreaGeodetic()
- Buffer()
- BufferGeodetic()
- Centroid()
- Clip()
- Contains()
- Crosses()
- Cut()
- Difference()
- Disjoint()
- Distance()
- Equals()
- Guid()
- Intersection()
- Intersects()
- Length()
- LengthGeodetic()
- MultiPartToSinglePart()
- Overlaps()
- Relate()
- SetGeometry()
- SymmetricDifference()
- Top()
- Touches()
- Union()
- Within()
Version 1.2
(September 2017)
New functions
Version 1.1
(June 2017)
Popup profile
The popup profile was added, allowing users to define expressions that will evaluate and display values calculated on the client when the popup displays in the view. Users can reference Arcade expressions with placeholders that will be replaced by expression values when the popup is opened. See the individual ArcGIS SDKs for examples of how this works within applications.