<?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: Display value(s) when not Null. If no value, display nothing. in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373902#M57053</link>
    <description>&lt;P&gt;That's it! Thanks a lot. I see I do not need to include the HTML as the expression works like I expect on its own. The only thing is how to somehow work the string "Township: "&amp;nbsp; into the expression.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jan 2024 15:11:54 GMT</pubDate>
    <dc:creator>JaredPilbeam2</dc:creator>
    <dc:date>2024-01-24T15:11:54Z</dc:date>
    <item>
      <title>Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373223#M57012</link>
      <description>&lt;P&gt;In the new Map Viewer, I have one simple hosted feature layer with 15 features. The fields I'm concerned with could have none or up to seven values, respectively. I'm attempting to build an Arcade expression that displays the value when there is one (or many). And when there is no value, display nothing.&lt;/P&gt;&lt;P&gt;For example, the first highlighted row (Wheatland) has no values, whereas the second highlighted row (Will Ride) has seven.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JaredPilbeam2_2-1705961964116.png" style="width: 865px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/92452iB8232A021BB508C6/image-dimensions/865x225?v=v2" width="865" height="225" role="button" title="JaredPilbeam2_2-1705961964116.png" alt="JaredPilbeam2_2-1705961964116.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The following works to get me the first value to display in the popup when there is one. I don't know how to properly display many.&lt;/P&gt;&lt;P&gt;Attribute expression:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var tp = $feature.Township
return IIf(IsEmpty(tp),"none", "block")&lt;/LI-CODE&gt;&lt;P&gt;Popup HTML:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;p style="display:{expression/expr8};"&amp;gt;
    Township: {Township}&amp;amp;nbsp;&amp;lt;br&amp;gt;
    &amp;amp;nbsp;
&amp;lt;/p&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideal scenario:&lt;/P&gt;&lt;P&gt;In the map, if I were to click the Wheatland polygon, I would see nothing. And if I clicked the Will Ride poly I would see:&amp;nbsp;&lt;STRONG&gt;Township: Crete, Frankfort, Green Garden, Monee, Peotone, Washington, Will&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 22:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373223#M57012</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2024-01-22T22:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373441#M57024</link>
      <description>&lt;P&gt;This code will return the list of townships, leaving out the blank ones.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Expects($feature, 'Townshi*'); //Requests all fields beginning with "Townshi" 
var fieldArr = ['Township','Township2','Township3','Township4','Township5','Township6','Township7'];
var output = [];
for (var index in fieldArr) {
  if (!IsEmpty($feature[fieldArr[index]])) Push(output, $feature[fieldArr[index]])
}
return Concatenate(output, ", ")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 15:51:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373441#M57024</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-01-23T15:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373902#M57053</link>
      <description>&lt;P&gt;That's it! Thanks a lot. I see I do not need to include the HTML as the expression works like I expect on its own. The only thing is how to somehow work the string "Township: "&amp;nbsp; into the expression.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 15:11:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1373902#M57053</guid>
      <dc:creator>JaredPilbeam2</dc:creator>
      <dc:date>2024-01-24T15:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1376944#M57195</link>
      <description>&lt;P&gt;Hi folks, I'm trying to do something similar in the pop-up. I want to display a bit of text with the link to a report, where one exists, but leave it completely blank where there isn't one. I assumed I could do this with the add 'Arcade' element to the pop-up, but although I have written a bit of code which returns the correct value in the test area, it doesn't work when live. Have I misunderstood how this works? I should add that I'm new to Arcade, beyond the simple stuff in Pro. Happy to share some sample data etc. if necessary. Ta&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 09:41:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1376944#M57195</guid>
      <dc:creator>SimonCrutchley</dc:creator>
      <dc:date>2024-02-01T09:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1377017#M57199</link>
      <description>&lt;P&gt;I would suggest opening a new question on this and provide the code that you've tried.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 14:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1377017#M57199</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-02-01T14:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Display value(s) when not Null. If no value, display nothing.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1377095#M57205</link>
      <description>&lt;P&gt;Okay. Will do.&lt;/P&gt;&lt;P&gt;Ta&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 16:20:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-display-value-s-when-not-null-if-no-value/m-p/1377095#M57205</guid>
      <dc:creator>SimonCrutchley</dc:creator>
      <dc:date>2024-02-01T16:20:49Z</dc:date>
    </item>
  </channel>
</rss>

