<?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: Help eliminating empty lines in a custom pop-up using Arcade in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298856#M15003</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/Lynn_Carlson"&gt;Lynn_Carlson&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One simple way of doing this is to include a new line in the formula and put the expressions on the same line in the pop-up (see sample below for the expression):&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;IIf&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TrainingAssist&lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"yes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Training and Assistance"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; TextFormatting&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;NewLine&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What this will do, is that when you want something to return it will return the text and go the the next line.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 26 Apr 2020 01:12:28 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2020-04-26T01:12:28Z</dc:date>
    <item>
      <title>Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298855#M15002</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created seven Arcade expressions in order to customize a pop up on a hosted feature layer in ArcGIS Online.&lt;/P&gt;&lt;P&gt;Each expression uses IIF to create the text I want to appear in the popup.&lt;/P&gt;&lt;P&gt;Example: if the feature has an attribute trainassist = 'yes', I have the text in the popup say "Training and Assistance"&lt;/P&gt;&lt;P&gt;so my expression consists of:&lt;/P&gt;&lt;P&gt;IIf($feature.TrainingAssist=="yes", "Training and Assistance", " ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if that same feature has a second attribute combat = 'yes', I have the text in the popup say "Combat"&lt;/P&gt;&lt;P&gt;IIf($feature.Combat=="yes", "Combat", " ")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a total of seven attributes that I do this for.&amp;nbsp; If an attribute doesn't have "yes", I don't want any text to appear, so the else is just " ".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trouble happens when I create the custom pop up using the Custom Attribute Display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="265" src="https://community.esri.com/legacyfs/online/490003_pastedImage_1.png" width="424" /&gt;&lt;/P&gt;&lt;P&gt;Simply listing the expressions one after the other results in empty lines in the popup&amp;nbsp; (the else " ") when the condition of 'yes' is not met.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji jive-image image-2 j-img-centered" height="146" src="https://community.esri.com/legacyfs/online/490007_arcade7.png" style="display: block; margin-left: auto; margin-right: auto;" width="433" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried building one combined expression with IsEmpty, and making an array variable, but I am stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached another graphic which goes into further detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Apr 2020 01:50:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298855#M15002</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2020-04-25T01:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298856#M15003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/Lynn_Carlson"&gt;Lynn_Carlson&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One simple way of doing this is to include a new line in the formula and put the expressions on the same line in the pop-up (see sample below for the expression):&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;IIf&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;$feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TrainingAssist&lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"yes"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Training and Assistance"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; TextFormatting&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;NewLine&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What this will do, is that when you want something to return it will return the text and go the the next line.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2020 01:12:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298856#M15003</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-04-26T01:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298857#M15004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;... and a more complex way of doing this can be found here:&amp;nbsp;&lt;A href="https://community.esri.com/docs/DOC-14276-conditional-field-display-with-arcade-in-pop-ups-revisited"&gt;https://community.esri.com/docs/DOC-14276-conditional-field-display-with-arcade-in-pop-ups-revisited&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 26 Apr 2020 01:13:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298857#M15004</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-04-26T01:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298858#M15005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much!&amp;nbsp; &lt;/P&gt;&lt;P&gt;On my first foray into GeoNet searching for an answer, I did not find your document.&amp;nbsp; After I went back and dug a little more, I did find it, but hadn't had a chance to get back on and update my own question before you answered.&lt;/P&gt;&lt;P&gt;Anyway, this is very helpful and I am making some great headway now.&lt;/P&gt;&lt;P&gt;Sorry I posted this without finding the answer the first time around.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2020 17:57:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298858#M15005</guid>
      <dc:creator>LynnCarlson__GISP</dc:creator>
      <dc:date>2020-04-27T17:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298859#M15006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/2128"&gt;Lynn Carlson, GISP&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't worry, it sometimes is difficult to find the right post since descriptions may be different. One way of making&amp;nbsp;useful posts easier to find is to mark them helpful or if they answer the question to mark them as the correct answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you run into problems you post them back here and I will get a notification.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 13:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298859#M15006</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-04-28T13:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298860#M15007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/2128"&gt;Lynn Carlson, GISP&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a minor request: could you mark the post that answered your question as the correct answer? Now it looks like you answered your own question and that answer may not be the information other users are after to solve similar situations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2020 15:29:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/298860#M15007</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-04-28T15:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help eliminating empty lines in a custom pop-up using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/1092514#M41902</link>
      <description>&lt;P&gt;TextFormatting.NewLine works great when I configure my popup in a webmap, however when I use that layer in a dashboard the newlines seem to be ignored and everything is put back to one long string?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 22:43:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-eliminating-empty-lines-in-a-custom-pop-up/m-p/1092514#M41902</guid>
      <dc:creator>JohnBickmore</dc:creator>
      <dc:date>2021-08-25T22:43:34Z</dc:date>
    </item>
  </channel>
</rss>

