I need help converting a VB Script label expression to Arcade
Function FindLabel ( [RoadName] , [RoadNumber] )if [RoadName] = "" thenFindLabel = [RoadNumber]else FindLabel = [RoadName]end ifEnd Function
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'])
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.