<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Arcade and Html tag &amp;lt;br&amp;gt; not working in ArcGis Enterprise 11.1 in ArcGIS Arcade Questions</title>
    <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641650#M81</link>
    <description>&lt;P&gt;Maybe try using concatenate?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fields = [
    'Division', 
    'StaffName', 
    'County', 
    'Route', 
    'BeginPM', 
    'EndPM', 
    'AreaCode',
    'CostCenter',
]

var descriptions = []
var field_value
for (var field in fields) {
    field_value = $feature[fields[field]]
    // skip empty values
    if (isEmpty(field_value)) { continue }
    Push(descriptions, `${labelFormat(fields[field])}: ${field_value}`)
}

return {
    'type': 'text', 
    'text': Concatenate(descriptions, br)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edited to use the proper return type for popupElement according to the webmap documentation&lt;/P&gt;</description>
    <pubDate>Mon, 18 Aug 2025 00:05:52 GMT</pubDate>
    <dc:creator>HaydenWelch</dc:creator>
    <dc:date>2025-08-18T00:05:52Z</dc:date>
    <item>
      <title>Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641632#M80</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I am new to Arcade, but I managed to put together an expression to hide fields with no values in pop-up layers.&lt;BR /&gt;The Arcade expression behaves the way I was expected in ArcGis Pro 3.1.&lt;BR /&gt;The layer pop-up shows correctly, see screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YasnaiaMassie_0-1755105367743.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138456i9F906A3B3683569C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YasnaiaMassie_0-1755105367743.png" alt="YasnaiaMassie_0-1755105367743.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Publishing as web layer to ArcGis Enterprise 11.1, I encounter these problems:&lt;BR /&gt;1- The Arcade expression does not render. Basically the web layer does not carry over the Arcade expression from ArcGis Pro to ArcGis Enterprise.&lt;/P&gt;&lt;P&gt;2- And Placing the Arcade code directly in the layer pop-up, ArcGis Enterprise, the expression does not accept the tag &amp;lt;br&amp;gt;, Html. See screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YasnaiaMassie_1-1755105367745.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138457iB8303176A657F02C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YasnaiaMassie_1-1755105367745.png" alt="YasnaiaMassie_1-1755105367745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached file for the code and its screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YasnaiaMassie_2-1755105367749.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138458i5CADC0147A6278C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YasnaiaMassie_2-1755105367749.png" alt="YasnaiaMassie_2-1755105367749.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you for your attention&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 17:20:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641632#M80</guid>
      <dc:creator>YasnaiaMassie</dc:creator>
      <dc:date>2025-08-13T17:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641650#M81</link>
      <description>&lt;P&gt;Maybe try using concatenate?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fields = [
    'Division', 
    'StaffName', 
    'County', 
    'Route', 
    'BeginPM', 
    'EndPM', 
    'AreaCode',
    'CostCenter',
]

var descriptions = []
var field_value
for (var field in fields) {
    field_value = $feature[fields[field]]
    // skip empty values
    if (isEmpty(field_value)) { continue }
    Push(descriptions, `${labelFormat(fields[field])}: ${field_value}`)
}

return {
    'type': 'text', 
    'text': Concatenate(descriptions, br)
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edited to use the proper return type for popupElement according to the webmap documentation&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 00:05:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641650#M81</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2025-08-18T00:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641666#M82</link>
      <description>&lt;P&gt;The HTML formatting in a text element doesn't get interpreted in the web map. Instead, use an Arcade element to show the HTML&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var test = "&amp;lt;b&amp;gt;This is the first line&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;This is the second line"
return { 
	type : 'text', 
	text : test //this property supports html tags 
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-08-13_14-16-15.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/138470i5841EAA67BFFADEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2025-08-13_14-16-15.PNG" alt="2025-08-13_14-16-15.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 18:18:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641666#M82</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-08-13T18:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641801#M83</link>
      <description>&lt;P&gt;Huh, I leaned something new today. Is there an API reason for this format?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: &lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-1-introducing-arcade-pop-up-content-elements" target="_self"&gt;I found a blog post that goes into how to create rich text elements in online pop ups.&lt;/A&gt;&amp;nbsp;I'm assuming that since the 'type' attribute is set to text that there are other options that you can give to the pop up.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-2-introducing-arcade-pop-up-content-elements" target="_self"&gt;Seems like if you follow that blog series there's a 'media' and 'fields' type as well&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/web-map-specification/objects/popupElement/" target="_self"&gt;here's the full spec from the esri developer docs.&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2025 01:25:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1641801#M83</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2025-08-14T01:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642742#M84</link>
      <description>&lt;P&gt;Hi Hayden,&lt;/P&gt;&lt;P&gt;Thank you so much for your answer.&lt;/P&gt;&lt;P&gt;I still do not know how to incorporate KenBuja snippet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 23:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642742#M84</guid>
      <dc:creator>YasnaiaMassie</dc:creator>
      <dc:date>2025-08-17T23:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642743#M85</link>
      <description>&lt;P&gt;Hi KenBuja,&lt;BR /&gt;Thank you so much for your answer.&lt;/P&gt;&lt;P&gt;Could you please give me an example how to incorporate&amp;nbsp; your code into:&lt;/P&gt;&lt;P&gt;var fields = Schema($feature).fields;&lt;BR /&gt;// Function to get alias for a field name&lt;BR /&gt;function alias(name) {&lt;BR /&gt;for (var f in fields) {&lt;BR /&gt;if (Lower(fields[f].name) == Lower(name)) {&lt;BR /&gt;return fields[f].alias;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;return name; // fallback if not found&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// ====== SWITCH HERE ======&lt;BR /&gt;// Set to true if HTML is enabled in the pop-up&lt;BR /&gt;var useHTML = true;&lt;/P&gt;&lt;P&gt;// Break line type based on mode&lt;BR /&gt;var br = IIF(useHTML, "&amp;lt;br&amp;gt;", TextFormatting.NewLine);&lt;/P&gt;&lt;P&gt;// Optional: bold labels in HTML mode&lt;BR /&gt;function labelFormat(lbl) {&lt;BR /&gt;return IIF(useHTML, "&amp;lt;b&amp;gt;" + lbl + "&amp;lt;/b&amp;gt;", lbl);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// Build each line only if value exists&lt;BR /&gt;var Desc1 = When(IsEmpty($feature.Division), '', labelFormat(alias("Division")) + ": " + $feature.Division);&lt;BR /&gt;var Desc2 = When(IsEmpty($feature.StaffName), '', br + labelFormat(alias("StaffName")) + ": " + $feature.StaffName);&lt;BR /&gt;var Desc3 = When(IsEmpty($feature.County), '', br + labelFormat(alias("County")) + ": " + $feature.County);&lt;BR /&gt;var Desc4 = When(IsEmpty($feature.Route), '', br + labelFormat(alias("Route")) + ": " + $feature.Route);&lt;BR /&gt;var Desc5 = When(IsEmpty($feature.BeginPM), '', br + labelFormat(alias("BeginPM")) + ": " + $feature.BeginPM);&lt;BR /&gt;var Desc6 = When(IsEmpty($feature.EndPM), '', br + labelFormat(alias("EndPM")) + ": " + $feature.EndPM);&lt;BR /&gt;var Desc7 = When(IsEmpty($feature.AreaCode), '', br + labelFormat(alias("AreaCode")) + ": " + $feature.AreaCode);&lt;BR /&gt;var Desc8 = When(IsEmpty($feature.CostCenter), '', br + labelFormat(alias("CostCenter")) + ": " + $feature.CostCenter);&lt;BR /&gt;// Return concatenated string&lt;BR /&gt;return Desc1 + Desc2 + Desc3 + Desc4 + Desc5 + Desc6 + Desc7 + Desc8;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Aug 2025 23:22:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642743#M85</guid>
      <dc:creator>YasnaiaMassie</dc:creator>
      <dc:date>2025-08-17T23:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642745#M86</link>
      <description>&lt;P&gt;Your return type needs to be a dictionary with two keys 'type' and 'text'&lt;/P&gt;&lt;P&gt;The webmap interprets that as a popupElement with the 'type' attribute determining which type of element you want (in your case text) and the properties you want to give to that element (in your case a 'text' property with the value being your html string)&lt;/P&gt;&lt;P&gt;Those resources I linked are full of good examples and explanations!&lt;/P&gt;&lt;P&gt;I've also edited my snippet to use that pattern.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 00:04:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1642745#M86</guid>
      <dc:creator>HaydenWelch</dc:creator>
      <dc:date>2025-08-18T00:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1650726#M94</link>
      <description>&lt;P&gt;Yeah, and in this example it didn't apply text sanitization to remove possibly cross-site scripting targets.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2025 16:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1650726#M94</guid>
      <dc:creator>TimWestern</dc:creator>
      <dc:date>2025-09-16T16:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade and Html tag &lt;br&gt; not working in ArcGis Enterprise 11.1</title>
      <link>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1690331#M136</link>
      <description>&lt;P&gt;Late to the party, but maybe simpler&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var desc1 = Iif(!IsEmpty($feature.Division), $feature.Division, '');
var desc2 = Iif(!IsEmpty($feature.StaffName), $feature.StaffName, '');
.
.
.
var desc8 = Iif(!IsEmpty($feature.CostCenter), $feature.CostCenter, '');

return Concatenate([desc1, desc2,...desc8], ' ';&lt;/LI-CODE&gt;&lt;P&gt;Add whatever non-html elements you want, e.g.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var desc1 = Iif(!IsEmpty($feature.Division), $feature.Division + ' Division', '');
/* or
var desc1 = Iif(!IsEmpty($feature.Division), $feature.Division + TextFormattingNewLine, '');
/* and so on.&lt;/LI-CODE&gt;&lt;P&gt;This would be in an Arcade expression in the Popup, so it shows as a field with whatever name you give the expression. Use this in a Text element (under 'Add Content'). In the text editor, you can go into the Source Editor and add whatever html you'd like. Or set things like bold in the text editor, same as if you were in Word or any other app.&lt;/P&gt;&lt;P&gt;There a few other ways to do this, like loops, separate expressions for each field, etc., but this is one way.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2026 20:19:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-arcade-questions/arcade-and-html-tag-lt-br-gt-not-working-in-arcgis/m-p/1690331#M136</guid>
      <dc:creator>ZenMasterZeke</dc:creator>
      <dc:date>2026-03-12T20:19:48Z</dc:date>
    </item>
  </channel>
</rss>

