I have fields with names in the format last, first, middle initial. I would like to display them as first, ME, last. Is this possible in Arcade using the Split function?
Solved! Go to Solution.
How is your data formatted? If it's in a field as "Smith, John A" then you can use
var arrName = split($feature.name, ",")
return arrName[1] + " " + arrName[0]
This returns "John A Smith"
How is your data formatted? If it's in a field as "Smith, John A" then you can use
var arrName = split($feature.name, ",")
return arrName[1] + " " + arrName[0]
This returns "John A Smith"
There's no comma just spaces, but this works. Thanks!
Glad to help. Don't forget to click the "Mark Correct" button.
I have created a Cell_ID field to store grid index values in a road feature class. For example, if Main St. falls within grid cells B1, B2, C2 & C3, my Cell_ID field is populated with "C3,B2,C2,B1". Is there any way for me to reorder the values alphabetically and then numerically as B1, B2, C2 & C3?
Solved my problem below:
var arrName = split($feature.Cell_ID, ",")
return concatenate(sort(arrName))