ArcGIS Online duplicate value Arcade Expression

297
1
12-21-2023 09:50 AM
Labels (1)
PeteCoventry5
New Contributor

I'm needing some help with an Arcade Expression for ArcGIS Online.  I need to symbolize any duplicate value in red and the remaining unique values in green.  I understand that I could create a new field any identify these duplicate values, but trying to resolve this with an Arcade Expression. 

Tags (2)
0 Kudos
1 Reply
JillianStanford
Occasional Contributor III

Hi,

I'm not sure if this is possible because the Visualization profile doesn't expose the layer as a profile variable, only the current feature and it does not include the Data Access bundle. https://developers.arcgis.com/arcade/profiles/visualization/

It looks like you could provide this info in a popup using

var rec_count = Count(Filter($layer, "FIELD_NAME='"+$feature.FIELD_NAME+"'"))
return IIf(rec_count>1, true, false)

If your data is relatively static, I would store this info in a new field.

Jill

 

0 Kudos