Hi,
I am having trouble to format a dashboard using an arcade expression in Enterprise 11.1.
In the mentioned dashboard I am using a webmap with the followed features: a table with medical specialties and services (besides the health unit of reference to each place and the county where the health unit is located); three featureset of point (grouped by the kind of health unit); and a featureset of polygon (containing all the counties of the State).
I am trying to use the table to create a selector, where I would like to choose the specialty. Considering the big number of records. For this, I used the option grouped values, but when a I do this, I canno't choose the healt unit code to filter the points in the map.
So, I tried to create an arcade code to group the specialites, but endep up just like the "grouped values"
Looking to the results, I believe I need to create a list o CNES_ref (the code of health unities wich I would like do use to select the points in the map) from the distincts records of specialties.
Or to create a dictionary with the codes and the distincts specialties.
Has anyone done something like this? Or know if there is a better solution?
var portal = Portal('https://www.iede.rs.gov.br/portal');
var fs = FeatureSetByPortalItem(portal,"c1e172ef4c6246fabf6b8523...
var esp = Distinct(fs,'DS_ESPECIALIDADE')
var fsDict = {
'fields': [
{ 'name': 'DS_ESPECIALIDADE', 'type': 'esriFieldTypeString'},
],
'geometryType': '',
'features': []
};
var index = 0
for (var feature in esp) {
fsDict.features[index++] = {
'attributes': {
'DS_ESPECIALIDADE': feature['DS_ESPECIALIDADE'],
}
}
}
return FeatureSet(Text(fsDict));