i have created a web map and i don't want the walls and stairs to be labeled, only the rooms.
When I take this code for the labeling it comes "Execution Error:Runtime Error: ".
Can you help me further?
Solved! Go to Solution.
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:
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.
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:
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.
What is the 'print' statement you are using? Replace that with 'return' and see if that works for you:
if ($feature["USER_RECEIPT_NU"] == 8967){
return('')
}
else{
return($feature["USER_ID_NUMBER"])
}
I just whipped this up on some data I have in AGOL...