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 |
Hi Marcos,
I think it's called a text constant in Arcade. Maybe try this --
"Unit " + $feature.Unit + TextFormatting.NewLine + $feature.Zone_
Thank you,
Lesi
I tried using + TextFormatting.NewLine + to build a stacked label in ArcGIS Online, but it still produced single line label
Hi Meg,
You're right. I should have tested it before posting. But the same expression is recognized by Pro 1.4 Alpha. So a workaround for now can be to author the label in Pro and then publish it. Maybe a support case can be filed to let esri know TextFormatting.NewLine is not working on ArcGIS Online?
Thanks,
Lesi
Did that workaround work for you? For me, it still ignores TextFormatting.NewLine after publishing.
Unfortunately, no. The issue probably won't get resolved until the "bug" is logged...
Just to clarify, TextFormatting.NewLine is supported in Arcade from a language perspective. The problem you are seeing is related to the fact that currently ArcGIS Online does not support multi-line labels; that is independent of the labeling syntax.
Thanks for the clarification, Paul! Do we know when that capability will become available in ArcGIS Online/Portal?
Unfortunately I don't have a timeline that I can share for multi-line labels.
I would also like to see this supported in ArcGIS Online.
Does anyone know if this has been logged as an enhancement or a bug so Esri can formally document it as something that needs addressed?