Hi,
I have a layout which has a map front and centre but also contains textual information from the map series set-up. In this example I have a PDF exported for each site with a unique address - part of the layout is to show the text, my issue is coming from trying to show the address over multiple lines rather than one long comma separated sting (which it is on the feature).
Example -
Address on feature = "The House, Long Road, Sunny Place, The World"
How i'd like to show it on the layout =
"The House,
Long Road,
Sunny Place,
The World"
I've looked at a couple of community posts and have the below Arcade code which has been fine for a bit of testing but when I have an address which doesn't get split into 4 arrays it doesn't show anything. I'm not massively fluent in Arcade, I think I need some form of IF statement but I don't really know where to start or if there is a better way to do it at all? Any help would be amazing 🙂
Arcade code...(image also attached)
var address = $feature.Owner_Addr
var SAddress = Split(address, ",")
Concatenate( ' ',SAddress[0], ',',TextFormatting.NewLine,SAddress[1], ',',TextFormatting.NewLine,SAddress[2], ',',TextFormatting.NewLine,SAddress[3])