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, } }
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.