Select to view content in your preferred language

Field-dependent labeling for one set of features

40
1
5 hours ago
Labels (1)
ElliottD
Emerging Contributor

In Pro 3.3, I have a set of cities whose names I want to label based on two fields, NAME and NAMEALT. If the city has a NAMEALT, I want to use that name. If it does not, I want to default to NAME. I thought that by using defaultValue in Arcade (see screenshot), it would return the NAME value if no NAMEALT value was detected. What am I doing wrong?

ElliottD_0-1728430421189.png

 

Tags (3)
0 Kudos
1 Reply
BarryNorthey
Frequent Contributor

I did a few tests and the syntax appears to be correct. The value field might have invisible blank spaces that could cause the problem. Python lstrip() can remove leading blank spaces.

 

0 Kudos