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

56205
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!

43 Replies
PatriciaMoehring
Occasional Contributor

Faith:  I added the hex code and the results show the fields separated on 2 lines but when using the expression in the pop-up, it doesn't show on 2 lines.  Am I doing something wrong?

Expression:  $feature.MINORTYPE+"\x0d\x0a"+$feature.LOCATION

Test Result:

MINORTYPE

LOCATION

This is how the pop-up title ends up 

Pop Up Image

by Anonymous User
Not applicable

This workaround doesn't seem to work anymore. Does anyone have any other suggestions?

0 Kudos
DamonPettitt
Occasional Contributor

I just stumbled across this limitation as well.  I would love to hear if anybody has found a workaround or if ESRI knows when the problem will be fixed.

NathanaelRodd
New Contributor II

Major limitation. Esri, please address this soon.

DanielHunter
New Contributor III

I believe this has been resolved with ArcGIS Pro 2.3.  I am able to get a stacked label placing my ID field on top of my elevation field using the following Arcade syntax.

$feature.ID + TextFormatting.NewLine + $feature.PAMAP_DEM

0 Kudos
DamonPettitt
Occasional Contributor

I thought this was only an issue in ArcGIS Online, which still seems to have the issue...

DanielHunter
New Contributor III

You are correct - I skimmed the conversations and replied in haste while looking for the new line syntax - thanks for clarifying

0 Kudos
AaronFerrari
New Contributor II

It did not work for me until I checked the box for Stack Label, it worked for me. I am using Python Parser in ArcGIS Pro 2.0

[Feature1].lstrip('0') + '\n' + [Feature2].lstrip('0')

deleted-user-1_r2dgYuILKY
Occasional Contributor III

Why is this still an issue?

XanderBakker
Esri Esteemed Contributor

It is still an issue since the Web Map is build with the 3.x version of the SDK and this is no longer an issue in version 4.x. Later this year the web map will be ported to 4.x resolving this and other issues, as far as I understand.