I need help converting a VB Script label expression to Arcade
Function FindLabel ( [RoadName] , [RoadNumber] )
if [RoadName] = "" then
FindLabel = [RoadNumber]
else FindLabel = [RoadName]
end if
End Function
Solved! Go to Solution.
The Arcade Playground is a great place to try things out. What you're doing here is similar to the Arcade function DefaultValue, in which a field is returned, but does something else if that field is null. In this case, you'd like the road number returned in that instance. This should do it:
return DefaultValue($feature['RoadName'], $feature['RoadNumber'])
The Arcade Playground is a great place to try things out. What you're doing here is similar to the Arcade function DefaultValue, in which a field is returned, but does something else if that field is null. In this case, you'd like the road number returned in that instance. This should do it:
return DefaultValue($feature['RoadName'], $feature['RoadNumber'])