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,
}
}