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

55585
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
ZacharyOrdo__GISP
New Contributor III

Is there a tentative or approximate release date for the Portal for ArcGIS release that will be ported to 4.x?

0 Kudos
JeffThomasILM
Occasional Contributor II

When the web map is updated to JS 4.x, will that only apply to newly-created web maps or will it automatically apply to existing web maps (originally created with JS 3.x), too?

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Jeff Thomas ,

Although I'm not entirely sure, the web map is stored as a Json. If that Json is interpreted by the new web map (based on JS 4.x), I would assume that it will show the new line. 

0 Kudos
BobSteiss
New Contributor III

I know this is an old thread but just thought I'd mention here that I tried the "Textformatting.Newline" in an arcade expression today in ArcGIS Online and it worked great.

JeffThomasILM
Occasional Contributor II

I've observed that new lines are honored in the Arcade expression editing environment, as you show in your screenshot, but it does not work in the map itself. Can you confirm the new lines show up on your map?

BobSteiss
New Contributor III

You are right Jeff.  Sorry,my fault I didn't check the map.  My two labels still show on the same line.  Hmm...that is unfortunate.

BrianWade
Occasional Contributor

I'm not sure what if I'm doing is what your doing, but this is working?......

Stacked Label

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi bswade ,

You're using ArcGIS Pro and the question is related with the web map. Since the web map is based on the the JS API 3.x it does not allow multiline labels. In the new web map that will become available soon (based on the JS API 4.x) it will support the multiline labels.

MatthewMalone
Occasional Contributor

Hi Xander,

Can you confirm if the multi-line labeling will be released in the first half of 2020?  The current Map Viewer Beta Road Map document includes "Label Authoring" in that timeframe?  Also, keeping all fingers and toes crossed for better labeling capabilities, e.g., removal of duplicates, spacing, line curvature, etc.  

Thanks!

-Matt, Farmington Hills, MI

0 Kudos
XanderBakker
Esri Esteemed Contributor

Hi Matthew Malone ,

At this moment you should have access to the Beta Web Map based on the JavaScript API 4.x. Although it does not yet have the option to author labels, you can author labels in the "old" 3.x version of the Web Map and include the TextFormatting.NewLine in an Arcade expression. This will show as a multi-line label in the beta 4.x based Web Map.