I'm attempting to pull data from a feature service table and share information in a linked feature pop up using the Arcade content element. When testing the code in the AGOL Developers sandbox, the code returns the correct formatting with line breaks after each line, but when running in the pop up, everything is returned as a continuous string. I have tried both the '\n' and TextFormmatting.NewLine formats for the line break, with no success. Code and screenshots from web map and sandbox below...
var permits = FeatureSetByPortalItem(***);
var BAA = 'WITTENBURG'
var filterStatement = 'BAA = @BAA'
var BAApermits = Filter(permits, filterStatement)
BAApermits = OrderBy(BAApermits, "Permit_Date_Start ASC")
var countPermits = Count(BAApermits)
var fsprint = []
var n = 0
for(var r in BAApermits){
var baaname = r.BAA
var permitType = r.Permit_Type
var permitStart = Text(r.Permit_Date_Start, "MM/DD/YYYY")
var permitEnd = Text(r.Permit_Date_End, "MM/DD/YYYY")
var permitDates = IIF(permitStart == permitEnd, permitStart, Concatenate([permitStart, '-', permitEnd], ' '))
n += 1
Push(fsprint, Concatenate([n, ". ", permitDates], ""));
}
var out = IIF(countPermits > 0,Concatenate(fsprint, TextFormatting.NewLine), '')
return {
type : 'text',
text : out
}
Sandbox (good formatting)

Pop up (bad formatting)
