How can I insert newline characters in an Arcade expression in ArcGIS Enterprise, the following:
'Rural SI VBP: ' +$feature.AllData_Rural_Site_Influences__VBP_
+ ' SI Non VBP: ' +$feature.AllData_Site_Influences__Non_VBP_
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:
If you are rendering your label in a JS 3.x map (like the current Map Viewer), TextFormatting.NewLine and "\n" are both ignored.
In a JS 4.x (Map Viewer Beta, certain Configurable Apps), both are valid ways of adding a new line.
Here's a layer of ours with multiline labels, first in a JS 3.x map:
And then in JS 4.x:
What version of Portal are you on? If you're at 10.8 or later, you can also create Hosted Map Image Layers that can take advantage of all the advanced labeling and symbology of Pro, but are based on a hosted feature layer. Works just the same in either map viewer, too.
Hosted Map Image Layers won't work for us as we are creating ArcGIS Pro maps on the fly from excel and loading them into ArcGIS Enterprise as Individual Map Image Layers. We create a couple a day during our peak season as the maps are used as an Audit tool for our data.
The problem starts in ArcGIS Pro when TextFormatting.NewLine is ignored.
Note that I've found some other info here: https://community.esri.com/t5/developers-questions/arcade-text-constant-for-textformatting-newline-i...