How to create a line break when concatenating text in ArcGIS online Arcade?

27131
19
12-19-2016 02:07 PM
MarcosMontelongo
New Contributor

When concatenating strings and attributes in ArcGIS online Arcade I would like to have the output in tow line.

In python it would be something like:

"Unit " + $feature.Unit + \n +$feature.Zone_

With the output looking like:

ResultValue
Result

Unit 2

Zone8400

TypeString
19 Replies
SarahAnderson1
New Contributor II

Are there any updates on this? Will multiline labels be supported in ArcGIS Online? I've tested the Arcade syntax again, but it does not appear that is yet supported.

Thanks,
Sarah

khalilramadeen
New Contributor III

I think you can customize by using Arcade expression for labels.

It's a workaround which I didn't test it yet but I believe it will help you.

Label features using Arcade expressions | ArcGIS API for JavaScript 3.25 

Thanks,

0 Kudos
AnthonyIerulli
New Contributor II

YES!  Please make the Arcade new line functions work in ArcGIS Online! I have come across multiple occasions where it would be useful. It is especially frustrating when the "Test" in the editing window shows multiple lines only to have a single line display in the map.

CynthiaParker1
New Contributor III

It would be really really lovely if this Arcade expression would be supported in AGOL. I just tried publishing labels I made in pro with it and it didn't work.

MiralemZeljo1
Occasional Contributor

https://community.esri.com/ideas/16126 

Let's vote up on this, this would be extremely helpful functionality.

Please help us get some votes on this.

0 Kudos
kathyhardinwalker
Occasional Contributor

I just gave this:

TextFormatting.NewLine 

a try and it worked.

Now I am actually trying to get TextFormatting.NewLine  to not put everything on a new line.

0 Kudos
MiralemZeljo1
Occasional Contributor

Did this work in the Web Map? I am not able to make it work. I think it works in collector and Arc Pro, however i am still waiting to see this working in Apps/Maps. It would be really great if we could get Esri to make this a reality.

GeeFernando
Occasional Contributor

Hi Miralem Zeljo, this works in ArcGIS API 4.x related products - Support Multi-Line Labels Using Arcade in AGOL 

But, if you are using ArcGIS API 3.x apps (e.g. Operations Dashboard) - this functionality wouldn't work - as stated in the Arcade Documentation.

An interim solution would be to - pass a HTML tag for line breaks instead - <br />

For example:

   {expression/expr0} + "<br />" + {expression/expr1}

This will cause any 4.x - apps and maps to look horrible, but will do the trick for 3.x related products (only works with popups not labels).

ValCannon2
New Contributor III

I'm still seeing this bug in ArcGIS Enterprise (portal) 10.7.1

0 Kudos
ChrisWiebke
Occasional Contributor

This worked for me in on-premise portal

Multi-line labels | ArcGIS API for JavaScript 4.14 

0 Kudos