laptop and a wrench

Bug

In Map Viewer, the Arcade $feature global variable returns fields alphabetically instead of the default field order it is published as.

Last Published: October 6, 2022 ArcGIS Online
Bug ID Number BUG-000152604
SubmittedSeptember 27, 2022
Last ModifiedSeptember 5, 2024
Applies toArcGIS Online
Version found10.2
Operating SystemN/A
Operating System VersionN/A
StatusWill Not Be Addressed

Additional Information

This issue is not addressed at this time as it is a breaking change to existing expressions.

Workaround

Use a different value other than $feature. For example,

var features = FeatureSetByName($map, 'layername')

var schema_dict = Schema(features);

var fields_array = schema_dict['fields'];

var allFields = '';

for(var i in fields_array){

  var fieldname =fields_array[i]['name']

  var allFields = Concatenate([allFields, fieldname, ": ", Text($feature[fieldname]), TextFormatting.NewLine]);

  }

return allFields

Steps to Reproduce

Bug ID: BUG-000152604

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