Hello everyone,
I am needing some assistance with writing a concatenation. I have a "label" attribute field that is currently "null".
I need to concatenate the fields from other columns into the "label" column.
Individual Columns:
Address
Pre-directional
Street
Street Type
I need to concatenate these individual columns to read as a full address in the "label" column.
I have tried several times, and while the expression I write will validate, I also get an error when I try to run it.
I am currently using ArcGIS Pro 3.1.3
Any help you all could provide would be greatly appreciated.
Thank you!
Solved! Go to Solution.
In Arcade, you can use the Concatenate function with an array of the items you want joined. Specifying the separator, in this example, an empty space, will result in that being placed in between each value of the array.
var fields = [
$feature.field1,
$feature.field2,
$feature.field3,
...
$feature.fieldN
]
return Concatenate(fields, ' ')
It's also possible to filter that array so that null entries are skipped. If you have some addresses with or without units, pre/post directionals, etc., it can be nice to avoid extra whitespace.
Where you would calculate using your field names.
Concatenate($feature.Address, ' ', $feature.PreDirectional, ' ', $feature.Street, ' ', $feature.St_Type)
The error could be caused by concatenating a string with an integer.
Where you would calculate using your field names.
Concatenate($feature.Address, ' ', $feature.PreDirectional, ' ', $feature.Street, ' ', $feature.St_Type)
In Arcade, you can use the Concatenate function with an array of the items you want joined. Specifying the separator, in this example, an empty space, will result in that being placed in between each value of the array.
var fields = [
$feature.field1,
$feature.field2,
$feature.field3,
...
$feature.fieldN
]
return Concatenate(fields, ' ')
It's also possible to filter that array so that null entries are skipped. If you have some addresses with or without units, pre/post directionals, etc., it can be nice to avoid extra whitespace.
Thank you so much! These solutions worked perfectly. Exactly what I needed.