I am trying to use TextFormatting.NewLine to add a new line to a Label Expression.
In the Playground, I am entering: $feature.name1 + TextFormatting.NewLine + $feature.name2
But the Result is showing a Space instead of a new line:
Am I setting up this expression correctly?
Thanks!
Solved! Go to Solution.
Hi Cheryl and George,
From Chris Whitmore: Arcade supports newline, however it is not supported in the map viewer and template apps. It’s a known limitation with the 3.x JSAPI. It will be addressed once the map viewer and configurable apps move to the 4x JSAPI. At this time, we don’t have a solid estimate on when that will be.
I hope this helps.
Scott
In fact using hex code for "\r\n", which is "\x0d\x0a", does add new line to the pop-ups.
Were you able to get this to work? I'm getting a space as well.
Thanks
Hi Cheryl and George,
From Chris Whitmore: Arcade supports newline, however it is not supported in the map viewer and template apps. It’s a known limitation with the 3.x JSAPI. It will be addressed once the map viewer and configurable apps move to the 4x JSAPI. At this time, we don’t have a solid estimate on when that will be.
I hope this helps.
Scott
Is there a BUG Number for this?
Thanks
John P
Hi John,
There is not a Bug number for this since it is currently just a limitation. We should start seeing support for this when we migrate to the 4x JSAPI, as Scott mentioned. The limitation is mentioned in relation to ArcGIS Online in the following documentation:
Create labels—ArcGIS Online Help | ArcGIS > Labeling considerations
I was just searching for the same solution. It would be really handy with the type of labels we want to place on our water and wastewater mains.
Is there a workaround? i.e How to add a new line
Has then been solved? Or does anyone know of a workaround to add a new line?
This is a HUGE limitation for this platform.... love the arcade language but this needs to be addressed soon.
In fact using hex code for "\r\n", which is "\x0d\x0a", does add new line to the pop-ups.