<?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: Expression Popup Formatting in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201956#M12537</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; Thanks for looking.&lt;BR /&gt;&lt;BR /&gt;Im thinking the issue is deeper than Arcade for the following reasons:&lt;BR /&gt;&lt;BR /&gt;1. This happens on Chrome, Edge, and IE11(Still have a machine with IE).&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;2 .&amp;nbsp; When I highlight the popup info in Map Viewer Classic and inspect it under Chrome the &amp;lt;span&amp;gt; tags&amp;nbsp; &amp;nbsp; &amp;nbsp; have&amp;nbsp; &lt;STRONG&gt;class="newcharline"&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;in the code&lt;/P&gt;&lt;P&gt;When I highlight the popup info in WebAppBuilder and inspect it under Chrome the &amp;lt;span&amp;gt; tags are missing the &lt;STRONG&gt;class="newcharline"&amp;nbsp;&lt;/STRONG&gt;code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a ticket with tech support open on this as of this morning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 15:52:34 GMT</pubDate>
    <dc:creator>RyanTucker</dc:creator>
    <dc:date>2022-08-11T15:52:34Z</dc:date>
    <item>
      <title>Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201137#M12529</link>
      <description>&lt;P&gt;Portal 10.8.1 Popup expressions that are pulling from related tables work fine and are formatted correctly in map viewer classic popups. But when I view the popups in WebAppBuilder the popups are all bunched together.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 23:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201137#M12529</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-08-09T23:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201200#M12530</link>
      <description>&lt;P&gt;Can you post the code please?&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="JohannesLindner_0-1660119690686.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48219i8B8DF70789FBFF4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1660119690686.png" alt="JohannesLindner_0-1660119690686.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1660119702048.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48220i0C8F14669F63F32A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1660119702048.png" alt="JohannesLindner_1-1660119702048.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 08:22:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201200#M12530</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-10T08:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201263#M12531</link>
      <description>&lt;P&gt;How are you handling line breaks in your popup expression? It looks like that's probably the cause, somehow WAB is ignoring your line breaks.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 12:54:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201263#M12531</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-08-10T12:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201377#M12532</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Arcade code I'm using is below. Thank you for taking a look.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;/* 
   Access 'Parcels has SiteAddressPoints' relationship using the function 
   FeatureSetByRelationshipName. This will pull all Base addresses on the 
   parcel from Site Address Points feature
*/

// These are the fields that need to be accessed from the related table
var assrFields = ['SITEADDID', 'FULLADDR']

// This is the variable to pull the related table records
var relatedrecords = (FeatureSetByRelationshipName($feature, 'SiteAddressPoint', assrFields, false))


// Declare variables 
var popupString = ''
var linebreak = "-------------------------"

/* 
   the popup expression is constructed by using a
   For Loop to iterate through all related features 
*/

for (var f in relatedrecords)
{
popupString += linebreak
    // If SITEADDID is not empty then add declared variable "a" to the popupString
    if (!IsEmpty(f.SITEADDID)){
        var a = (TextFormatting.NewLine + "APN: " + f.SITEADDID)
        popupString += a
    }
    // If FULLADDR is not empty then add declared variable "a" to the popupString    
    if (!IsEmpty(f.FULLADDR)){
        var a = (TextFormatting.NewLine + f.FULLADDR)
        popupString += a
    }
    
popupString += TextFormatting.NewLine + linebreak    
}  

return popupString&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 20:27:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201377#M12532</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-08-10T20:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201757#M12534</link>
      <description>&lt;P&gt;Hmmm... I can't reproduce this, they look the same to me:&lt;/P&gt;&lt;P&gt;Map Viewer Classic:&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1660197841748.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48386iE78D7BB8E65A3FFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_0-1660197841748.png" alt="JohannesLindner_0-1660197841748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Web App Builder:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1660197919336.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48387i13683CFB1CB081F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1660197919336.png" alt="JohannesLindner_1-1660197919336.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, notice that the first "&lt;STRONG&gt;linebreak&lt;/STRONG&gt;" line in my popups is only half length (the last one, too)? If you look at your code, that makes sense: At the end of each iteration, you add a new line and &lt;STRONG&gt;linebreak&lt;/STRONG&gt;, at the start you add &lt;STRONG&gt;linebreak&lt;/STRONG&gt;. So for each iteration &lt;EM&gt;except the first&lt;/EM&gt;, the dashed line on top will be &lt;STRONG&gt;2 * linebreak&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Looking at your popups, I don't see that behavior, so unless I'm missing something, this doesn't seem to be the code your popups use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, try a slightly different approach:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var linebreak = "-------------------------"
var popupLines = [linebreak]  // we're using an array to store the lines of the popup

for (var f in relatedrecords) {
    // If SITEADDID is not empty, push it into the array
    if (!IsEmpty(f.SITEADDID)){
        Push(popupLines, "APN: " + f.SITEADDID)
    }
    // If FULLADDR is not empty, push it into the array
    if (!IsEmpty(f.FULLADDR)){
        Push(popupLines, f.FULLADDR)
    }
    // get the dashed line in
    Push(popupLines, linebreak)
}  
// Concatenate the array with NewLine and return
return Concatenate(popupLines, TextFormatting.NewLine)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 06:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201757#M12534</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-08-11T06:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201956#M12537</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294341"&gt;@JohannesLindner&lt;/a&gt;&amp;nbsp; Thanks for looking.&lt;BR /&gt;&lt;BR /&gt;Im thinking the issue is deeper than Arcade for the following reasons:&lt;BR /&gt;&lt;BR /&gt;1. This happens on Chrome, Edge, and IE11(Still have a machine with IE).&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;2 .&amp;nbsp; When I highlight the popup info in Map Viewer Classic and inspect it under Chrome the &amp;lt;span&amp;gt; tags&amp;nbsp; &amp;nbsp; &amp;nbsp; have&amp;nbsp; &lt;STRONG&gt;class="newcharline"&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;in the code&lt;/P&gt;&lt;P&gt;When I highlight the popup info in WebAppBuilder and inspect it under Chrome the &amp;lt;span&amp;gt; tags are missing the &lt;STRONG&gt;class="newcharline"&amp;nbsp;&lt;/STRONG&gt;code.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I have a ticket with tech support open on this as of this morning.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 15:52:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1201956#M12537</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-08-11T15:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expression Popup Formatting</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1210602#M12604</link>
      <description>&lt;P&gt;I ended up having to upgrade my Portal setup to 10.9.1 to resolve the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 23:15:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/expression-popup-formatting/m-p/1210602#M12604</guid>
      <dc:creator>RyanTucker</dc:creator>
      <dc:date>2022-09-07T23:15:48Z</dc:date>
    </item>
  </channel>
</rss>

