laptop and a wrench

Bug

The Arcade expression DomainName() does not work as expected with an attribute in ArcGIS Online.

Last Published: March 8, 2019 ArcGIS Online
Bug ID Number BUG-000120493
SubmittedMarch 2, 2019
Last ModifiedJune 5, 2024
Applies toArcGIS Online
Version foundN/A
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

According to https://developers.arcgis.com/arcade/guide/logic/ "For more complex expressions, we suggest you explicitly list all field attributes that will be used in the execution of the script at the top of the expression. This will ensure the profile, app, and map all request the appropriate fields so the expression executes properly." This is a known limitation with dynamically optimizing queries and field declaration. When writing expressions it is always best to declare the field first to ensure that it behaves accordingly. For example: $feature.COLLEGE; $feature.POPULATION; Round(($feature.COLLEGE / $feature.POPULATION) * 100, 2);

Workaround

Add description in the field instead.

Or

Declare the field at the start of the expression so that it gets requested.

For example:

$feature.Domain //the field name of the domain

DomainName($feature, "Domain")

Steps to Reproduce

Bug ID: BUG-000120493

Software:

  • ArcGIS Online

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options