I am trying to create 2 classes of symbol based on attributes.
I refer to this doc: https://pro.arcgis.com/fr/pro-app/latest/help/mapping/layer-properties/set-custom-expressions-for-symbology.htm
Therefore create this arcade expression:
var example_array = [1, 2, 3, 4];
if (IndexOf(example_array, $feature.ccogrm_0) > -1) {
return “Public”;
} else {
return “Privé”;
}
But when testing it, got this error message: Expression not valid Error on line 3 id expected
I hoped for an esay going thing when only trying to create 2 classes of attribute but one again things got deep with Esri.
Is there any other method to create classes based on text values? Like this but in arcade
if value in $feature.exemple is 'exemple1' then class = "Class A"
if value in $feature.exemple is 'exemple2' then class = "ClassB"
if value in $feature.exemple is 'exemple3' then class = "ClassA"