I finally have a new laptop and it's about to be a new fiscal year, so I am starting off my new GIS project with a clean slate--as in I'm kicking all my kludged together maps and bloated geodatabase with dozens and dozens of orphaned items to the curb. I have been putting off using Arcade, but since I also plan on publishing more content to our portal, I want to start using it to make life easier for those online maps.
My current dilemma is that I can't figure out how to manipulate a label string the way I need to. I have a field (Office Name) that includes the City and State. To make labelling easier, I want to remove the last three characters in that field, which is a space and then the two character state abbreviation. With Python, I can do it thusly:
def FindLabel ( [OFC_NM] ):
L = [OFC_NM]
L = L.title()
L = L[:-3]
return L
How the heck do I this (properly) with Arcade?
arcade formatting arcade language string.format