Arcade Text Constant for TextFormatting.NewLine is adding space instead of new line

55569
43
Jump to solution
12-22-2016 08:40 AM
CherylHagevik
Esri Contributor

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!

2 Solutions

Accepted Solutions
ScottMoore__Olympia_
Esri Contributor

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

View solution in original post

FatihDur
New Contributor II

In fact using hex code for "\r\n", which is "\x0d\x0a", does add new line to the pop-ups.

View solution in original post

43 Replies
GeorgePlumley
Occasional Contributor

Were you able to get this to work? I'm getting a space as well.

Thanks

ScottMoore__Olympia_
Esri Contributor

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

JohnPlunkett
Esri Contributor

Is there a BUG Number for this?

Thanks
John P

CherylHagevik
Esri Contributor

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

RebeccaBrown
New Contributor

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.

TarigAhmed3
New Contributor II

Is there a workaround?  i.e How to add a new line

ashleyhanes
New Contributor II

Has then been solved? Or does anyone know of a workaround to add a new line? 

deleted-user-amp86F9KgPL3
New Contributor III

This is a HUGE limitation for this platform.... love the arcade language but this needs to be addressed soon. 

FatihDur
New Contributor II

In fact using hex code for "\r\n", which is "\x0d\x0a", does add new line to the pop-ups.