How could I use feature class using ALIAS instead of FieldName in pop up AGOL?
Solved! Go to Solution.
How is your popup configured?
A "field list" element should use the alias by default, and an Arcade element is totally in your control as to what is displayed and how.
How is your popup configured?
A "field list" element should use the alias by default, and an Arcade element is totally in your control as to what is displayed and how.
I don't know, but for me it doesn't. It shows field_name instead
You can get the alias of the field by first getting the schema of either the feature or layer.That returns a dictionary of the fields and their names, aliases, types, and other information.
In this example, I'm constructing a list of the field aliases for fields that contain the word "MAX" in the field name and have a value of one.
var theSchema = Schema($feature);
var fields = theSchema['fields'];
var species = [];
for (var i in fields) {
if (Find('MAX', fields[i]['name']) > -1 && $feature[fields[i]['name']] == 1) {
Push(species,fields[i]['alias']);
}
}
And what would be expression if simple I want to use Alias, without loooking for specific word.
Can you give an example of what content you would like to see in the popup?