How to include a Carriage Return or NewLine into an ARCADE Label expression?

51519
10
Jump to solution
02-21-2021 06:56 PM
Labels (1)
LeandraGordon
Occasional Contributor II

How can I insert newline characters in an Arcade expression in ArcGIS Enterprise, the following:

'Rural SI VBP: ' +$feature.AllData_Rural_Site_Influences__VBP_
+ textformatting.NewLine
+ ' SI Non VBP: ' +$feature.AllData_Site_Influences__Non_VBP_
+ textformatting.newline

seems to be ignored in ArcGIS Enterprise. 
The inital maps are being prepared in ArcGIS Pro 2.4 so if there is a way we could do this there and have the labels show up in Portal that would work for us too.

I understand from previous questions that textformatting.NewLine isn't supported? But it is included in the documentation here: https://pro.arcgis.com/en/pro-app/latest/help/mapping/text/text-formatting-tags.htm

This is how it looks for us currently in Mapinfo:

LeandraGordon_0-1613962360841.png

 

Tags (3)
10 Replies
jcarlson
MVP Esteemed Contributor

Well, it is the Pro documentation, I wouldn't expect most of it to apply anywhere else. With Arcade, there's Pro, and there's everywhere else. When you're in a web context, it really matters what profile of Arcade you're using. (https://developers.arcgis.com/arcade/profiles/)

The labeling profile is strictly looking for a text string. It's unfortunate that Pro handles that string differently from other contexts, because that can be pretty misleading. But everywhere else, the profiles are consistent with how they handle things like HTML tags, etc.

- Josh Carlson
Kendall County GIS
0 Kudos