I can get the fields from a Feature or a FeatureSet using the Schema function and cycling through the fields key
var output = []
var fields = Schema(item).fields;
for (var f in fields) {
Push(output, fields[f].name)
}
return {
type : 'text',
text :Concatenate(output, ', ')
}
For a Feature, in AGOL, the fields are returned in alphabetical order (with the exception of OBJECTID). In ArcGIS Pro, they are returned in their original order. These two screenshots use the same item from AGOL and the same code in the Arcade element
For a FeatureSet, the order of the fields depends on how I get that FeatureSet. If I get it from the map using FeatureSetByName, the fields are returned in alphabetical order. If I get it from the Portal using FeatureSetByPortalItem, they are returned in their original order.
Why isn't this consistent?
Solved! Go to Solution.
There are closed bugs and enhancement requests for these quirks
There are closed bugs and enhancement requests for these quirks
Is there some way for me to be notified if/when ENH-000140303 is implemented? Or subscribe to it, or even just to view it? (Or can I only see enhancement requests submitted by my organisation?)