Allow Arcade to deterine the number of features in a list or map layer in Operations Dashboard, and how many of them are selected.

692
2
05-18-2020 12:38 AM
MarkPainter
New Contributor II

Now some elements in a dashboard can use Arcade, the ability to determine how many features in a map layer or list would be really useful.  As not all attributes are summable (e.g. rates) it makes no sense to have an indicator display a value when more than one feature is selected (or indeed, no features are selected).  Something like the following code would be ideal.

if( Count( selectedFeaturesInList1 ) == 1) {
    var returnString = "One selected"
} else {
    var returnString = "More than one selected"
 }
return {
    textColor: '',
    backgroundColor: '',
    separatorColor:'',
    selectionColor: '',
    selectionTextColor: '',
    attributes: {
      attribute1: returnString,
    }
}
Tags (1)
2 Comments
patrickb
Status changed to: In Product Plan
 
patrickb
Status changed to: Under Consideration

There have been many improvements in Dashboards when it comes to Arcade. However, the ability to pass in things like the 'selected state' of elements into Arcade has not been added yet. 

https://doc.arcgis.com/en/dashboards/get-started/use-arcade-in-dashboards.htm