laptop and a wrench

Bug

The 'TextFormatting.NewLine' function of the Arcade expression does not work in Map Viewer Classic while configuring labels.

Portal for ArcGIS
Bug ID Number BUG-000161285
SubmittedSeptember 8, 2023
Last ModifiedSeptember 29, 2025
Applies toPortal for ArcGIS
Version found11.1
Operating SystemWindows Server
Operating System Version2019 64 Bit
StatusKnown Limit

Additional Information

This is a known limitation in ArcGIS Enterprise and ArcGIS Online when using ArcGIS Maps SDK for JavaScript 3.x and Map Viewer Classic. Refer to this documentation, https://developers.arcgis.com/arcade/function-reference/constants/#textformattingnewline where it states, 'Multi-line labels are NOT supported in the ArcGIS API 3.x for JavaScript nor in the ArcGIS Online map viewer'.

Workaround

  1. Remove this function so the label is on one line only.
  2. Keep new line function and change the label styles placement to center along since above and below placement do not work.

Utilize Map Viewer. Map Viewer use ArcGIS Maps SDK for JavaScript. 4.x, the latest version.

Steps to Reproduce

Bug ID: BUG-000161285

Software:

  • Portal for ArcGIS

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options