When concatenating strings and attributes in ArcGIS online Arcade I would like to have the output in tow line.
In python it would be something like:
"Unit " + $feature.Unit + \n +$feature.Zone_
With the output looking like:
Result | Value |
---|---|
Result | Unit 2 Zone8400 |
Type | String |
Are there any updates on this? Will multiline labels be supported in ArcGIS Online? I've tested the Arcade syntax again, but it does not appear that is yet supported.
Thanks,
Sarah
I think you can customize by using Arcade expression for labels.
It's a workaround which I didn't test it yet but I believe it will help you.
Label features using Arcade expressions | ArcGIS API for JavaScript 3.25
Thanks,
YES! Please make the Arcade new line functions work in ArcGIS Online! I have come across multiple occasions where it would be useful. It is especially frustrating when the "Test" in the editing window shows multiple lines only to have a single line display in the map.
It would be really really lovely if this Arcade expression would be supported in AGOL. I just tried publishing labels I made in pro with it and it didn't work.
https://community.esri.com/ideas/16126
Let's vote up on this, this would be extremely helpful functionality.
Please help us get some votes on this.
I just gave this:
TextFormatting.NewLine
a try and it worked.
Now I am actually trying to get TextFormatting.NewLine to not put everything on a new line.
Did this work in the Web Map? I am not able to make it work. I think it works in collector and Arc Pro, however i am still waiting to see this working in Apps/Maps. It would be really great if we could get Esri to make this a reality.
Hi Miralem Zeljo, this works in ArcGIS API 4.x related products - Support Multi-Line Labels Using Arcade in AGOL
But, if you are using ArcGIS API 3.x apps (e.g. Operations Dashboard) - this functionality wouldn't work - as stated in the Arcade Documentation.
An interim solution would be to - pass a HTML tag for line breaks instead - <br />
For example:
{expression/expr0} + "<br />" + {expression/expr1}
This will cause any 4.x - apps and maps to look horrible, but will do the trick for 3.x related products (only works with popups not labels).
I'm still seeing this bug in ArcGIS Enterprise (portal) 10.7.1
This worked for me in on-premise portal