<?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 New Map Viewer: Differences between popup Arcade content and Arcade attribute expression in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/new-map-viewer-differences-between-popup-arcade/m-p/1317008#M13906</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there any resource that details the different capabilities provided by the Arcade popup content item and just regular old building an arcade expression? As an example, I used this snipped of code in the Arcade popup content as part of an Arcade Field Template:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if ( IsEmpty($feature.Species) ) {
  species = "&amp;lt;font color='#aa0000'&amp;gt;&amp;lt;b&amp;gt;NO DATA&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;";
} else {
  species = "&amp;lt;font color='#1f968b'&amp;gt;" + $feature.Species + "&amp;lt;/font&amp;gt;";
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; and get this result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_0-1691601478303.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77692iDFA9C5874B0392A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_0-1691601478303.png" alt="ZachBodenner_0-1691601478303.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I go into the popup menu and use the expression builder to build a new expression and try to do some similar text formatting I get a different result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;for (var f in relatedDataSorted){
    
    popupString += Text(f.Date, 'MMMM Y') + TextFormatting.NewLine +
    
        "&amp;lt;font color= '#aa0000'&amp;lt;b&amp;gt;Maintenance Performed: &amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;" +
        DefaultValue(f.Maintenance_Performed, 'No maintenance performed') + TextFormatting.NewLine +&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_1-1691601573724.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77693i904F26BCC075AE1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_1-1691601573724.png" alt="ZachBodenner_1-1691601573724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formatting is just returned as text. Am I missing something obvious? It appears to me that these two different ways to use Arcade have different capabilities. Is that not true? If it is true, are there resources that explain how to use these two things differently?&lt;/P&gt;</description>
    <pubDate>Wed, 09 Aug 2023 17:20:57 GMT</pubDate>
    <dc:creator>ZachBodenner</dc:creator>
    <dc:date>2023-08-09T17:20:57Z</dc:date>
    <item>
      <title>New Map Viewer: Differences between popup Arcade content and Arcade attribute expression</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/new-map-viewer-differences-between-popup-arcade/m-p/1317008#M13906</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is there any resource that details the different capabilities provided by the Arcade popup content item and just regular old building an arcade expression? As an example, I used this snipped of code in the Arcade popup content as part of an Arcade Field Template:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if ( IsEmpty($feature.Species) ) {
  species = "&amp;lt;font color='#aa0000'&amp;gt;&amp;lt;b&amp;gt;NO DATA&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;";
} else {
  species = "&amp;lt;font color='#1f968b'&amp;gt;" + $feature.Species + "&amp;lt;/font&amp;gt;";
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; and get this result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_0-1691601478303.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77692iDFA9C5874B0392A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_0-1691601478303.png" alt="ZachBodenner_0-1691601478303.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I go into the popup menu and use the expression builder to build a new expression and try to do some similar text formatting I get a different result:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;for (var f in relatedDataSorted){
    
    popupString += Text(f.Date, 'MMMM Y') + TextFormatting.NewLine +
    
        "&amp;lt;font color= '#aa0000'&amp;lt;b&amp;gt;Maintenance Performed: &amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;" +
        DefaultValue(f.Maintenance_Performed, 'No maintenance performed') + TextFormatting.NewLine +&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_1-1691601573724.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77693i904F26BCC075AE1F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_1-1691601573724.png" alt="ZachBodenner_1-1691601573724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formatting is just returned as text. Am I missing something obvious? It appears to me that these two different ways to use Arcade have different capabilities. Is that not true? If it is true, are there resources that explain how to use these two things differently?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 17:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/new-map-viewer-differences-between-popup-arcade/m-p/1317008#M13906</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2023-08-09T17:20:57Z</dc:date>
    </item>
  </channel>
</rss>

