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

58306
44
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!

44 Replies
TKSHEP
by
Occasional Contributor

Hello, where you able to get the new line to work in arcgis online?  I am trying both functions the + "\n" +  and + TextFormatting.NewLine + and neither will return a new line.  Any suggestions?

MattCreaney
Occasional Contributor
I was able to use
to add a new line
0 Kudos
TKSHEP
by
Occasional Contributor

What where you able to use?   Any help is greatly appreciated!

Thank you very much!

0 Kudos
MattCreaney
Occasional Contributor
I used the HTML tag BR inside < and >. Sorry, looks like the tag couldn’t be escaped in last post
MadhuriShetye
New Contributor

Hi,

I wanted to add some labels on a new line, so I searched and found a solution here. However, I faced the same issue where it didn't work initially, Then I explored the label properties and I got the answer, In label properties >Fitting strategy> stack label by removing the space option I finally got it to work 

MadhuriShetye_0-1721133459068.png

 

0 Kudos