Hello! I am attempting to use an arcade expression to pull a list of field names that have the domain "yes" selected. I followed the how to guide (link below) and it succeeded in listing the fields where the expression == "Yes", however it is iterating through all the fields instead of just the list of fields I need. Does any one know how to make sure it is pulling only from the specified list of fields as selected in the "expects"? My copy of the code is:
Expects ($feature, 'Patching', 'UtilityPatching', 'Potholes', 'Separation', 'Sinkholes', 'Settling')
var yes = []
for (var field in $feature) {
if ($feature[field]== "Yes"){
Push(yes, field)
}
}
return Concatenate(yes, ", ")
https://support.esri.com/en-us/knowledge-base/how-to-display-field-names-in-pop-ups-based-on-field-va-000029827