I'd recommend reviewing the Structure and Logic page of the Arcade guide, as it goes over some of the specifics for how Arcade works. Regarding your expression:
- Use return instead of print to return a value
- You don't need to return an empty string for features you don't want labeled, simply leave them out of the expression entirely
- A logical 'AND' in Arcade is &&
- Your if statement appears to be filtering the opposite to your stated intent
Rewriting your expression, it might look like this:
var n = $feature.name
if(n != 'Wand' && n != 'Treppe'){
return n
}
Do you need your map to be in the Classic viewer? Note that in the new version of the Map Viewer, you can apply filters to your label class and avoid this altogether.
- Josh Carlson
Kendall County GIS