Interesting Arcade problem here. So I have an attribute column that is filled with bullet lists. As an example, it might read something like:
• Maintain marsh and wetland by managing hydrology of Timber Creek
• Manage invasive species including purple loosestrife in marsh areas. Buckthorn, Tartarian honeysuckle and garlic mustard in woodlands.
Well, when I call that field in an Arcade expression, the carriage return isn't honored, and so the result is something like:
• Maintain marsh and wetland by managing hydrology of Timber Creek • Manage invasive species including purple loosestrife in marsh areas. Buckthorn, Tartarian honeysuckle and garlic mustard in woodlands.
So I thought to try a Split to remove the bullets and return the result as a string of text separated by new lines. I use the bullet as the Split character, run through the result in a for loop, and push the loop result to a new array, which I then try to break apart via the Concatenate variable (with a new line return).
var name = $feature.Name
var addr = $feature.Address
var acres = round($feature.Acres,2)+" acres"
//split attempt
var sMgmt = split($feature.ManagementGoals,"•",10)
var mm =[]
for (var m in sMgmt){ if(!isEmpty(m)) {push(mm,sMgmt[m])} }
var v = concatenate(mm,TextFormatting.NewLine)
console ("count of split Mgmt goalks: "+count(sMgmt))
console ("item 1: "+sMgmt[0])
console ("item 2: "+sMgmt[1])
console ("item 3: "+sMgmt[2])
console ("mm: "+mm)
console ("v: "+v)
var n = `<h3 style="color:#095902;font-size:24px;text-align:center;">${name}</h3>`
var a = `<p style="text-align:center;"><span style=color:#3e3e3e;font-size:16px;><strong>${addr}</strong><br><strong>${acres}</strong></span></p>`
var textString = `${n}${a}
<p style = "font-size:16px;"><strong>Existing Landscale and Features</strong></p>
<p>${$feature.ExistingLandscape}<p>
<p style = "font-size:16px;"><strong>Management Goals</strong></p>
<p>${v}<p>
<p style = "font-size:16px;"><strong>Past Projects</strong></p>
<p>${$feature.PastProjects}<p>
<p style = "font-size:16px;"><strong>Future Projects</strong></p>
<p>${$feature.FutureProjects}<p>
<p style = "font-size:16px;"><strong>Additional Notes</strong></p>
<p>${$feature.AdditionalNotes}<p>
`
return {
type : 'text',
text : textString
}
However, the variable v to concatenate doesn't seem to be working correctly, and just returns one long string:

Which part of the process is failing me here? I've tried a couple other ways to do this, but if there's an alternative to achieving the result of having the attribute value broken out into lines (with or without the bullet character), I'd be happy to adapt.
Additional context: I have full control over the dataset. The bullet point is not a requirement of the data and could be removed or changed, though I suspect either will still produce the same general workflow of using some kind of split, given that the attribute will still contain the list.