<?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: Hiding fields / Return default text for null fields in popupTemplate in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1077349#M73797</link>
    <description>&lt;P&gt;It looks like in API 4.20 Arcade expressions can now be rendered in the popupTemplate. I am not sure if it matters but I have the expressionInfos at the end of my popupTemplate (after the content section). DefaultValue expression works correctly now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jul 2021 17:08:25 GMT</pubDate>
    <dc:creator>luckachi</dc:creator>
    <dc:date>2021-07-09T17:08:25Z</dc:date>
    <item>
      <title>Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247628#M22933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to hide or display "Not Recorded" / "No Data" for fields that may be null in a popupTemplate? I have a few fields that are not required, thus containing nulls. I want to return a specific set of attributes from a query but depending on the resulting feature, these fields may be empty and I'd prefer to have some "filler text" versus having those sections of the popupTemplate be blank. I'd also like to hide a few fields from the popup if they are null (chemicals #2 &amp;amp; #3) I've seen some information on using Arcade IIF statements to set default values if the field is null but I get the impression that these statements can't be placed in the expressionInfos section of the popupTemplate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Picture attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Aug 2020 14:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247628#M22933</guid>
      <dc:creator>Claire_Peterson</dc:creator>
      <dc:date>2020-08-25T14:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247629#M22934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm researching the same thing today. Haven't figured it out yet but hopefully will post here if I do. Trying to work off:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;JSAPI sample (more complicated than I need):&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/popuptemplate-arcade/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/popuptemplate-arcade/index.html"&gt;Reference Arcade expressions in PopupTemplate | ArcGIS API for JavaScript 4.16&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;AGOL blog:&amp;nbsp;&lt;A href="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups"&gt;https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;GeoNet question:&amp;nbsp;&lt;A href="https://community.esri.com/thread/233503-can-i-eliminate-empty-values-using-arcade-in-my-pop-up"&gt;https://community.esri.com/thread/233503-can-i-eliminate-empty-values-using-arcade-in-my-pop-up&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Some of the comments after the AGOL blog are leading in me in good directions but not quite there. Have you figured it out yet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 18:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247629#M22934</guid>
      <dc:creator>MikeDolbow</dc:creator>
      <dc:date>2020-08-26T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247630#M22935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/6724"&gt;Mike Dolbow&lt;/A&gt; No luck yet &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt; I have been working off the same 3 examples but have not had any success. If I do find something that works I will certainly post it here!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2020 12:15:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/247630#M22935</guid>
      <dc:creator>Claire_Peterson</dc:creator>
      <dc:date>2020-08-27T12:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1045420#M72424</link>
      <description>&lt;P&gt;Does anyone have any updates for this? diving back into this and still no success on how to set a default text if the field is null. Would rather show something like "Not Reported" / "No Data" instead of having it blank&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 14:03:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1045420#M72424</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-04-09T14:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1066571#M73445</link>
      <description>&lt;P&gt;Hi, this worked for me:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This is the template&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;tr&amp;nbsp;style="display:{expression/origin};"&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;th&amp;nbsp;class="esri-feature-fields__field-header"&amp;gt;Origin&amp;lt;/th&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;nbsp;class="esri-feature-fields__field-data"&amp;gt;{origin}&amp;lt;/td&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;/tr&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This is my expression&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;expressionInfos&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;[{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"origin"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;expression&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"IIf($feature.origin&amp;nbsp;==&amp;nbsp;null,&amp;nbsp;'none',&amp;nbsp;'table-row');"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This is the rendered html&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;lt;tr style="display: none;"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th class="esri-feature-fields__field-header"&amp;gt;Origin&amp;lt;/th&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;td class="esri-feature-fields__field-data"&amp;gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Jun 2021 19:21:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1066571#M73445</guid>
      <dc:creator>EdgardoIbarra</dc:creator>
      <dc:date>2021-06-09T19:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1069426#M73527</link>
      <description>&lt;P&gt;Unfortunately it seems like Arcade expressions do not work in the standard popupTemplate which I was hoping to use versus creating an html table.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 15:21:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1069426#M73527</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-06-17T15:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding fields / Return default text for null fields in popupTemplate</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1077349#M73797</link>
      <description>&lt;P&gt;It looks like in API 4.20 Arcade expressions can now be rendered in the popupTemplate. I am not sure if it matters but I have the expressionInfos at the end of my popupTemplate (after the content section). DefaultValue expression works correctly now&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 17:08:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/hiding-fields-return-default-text-for-null-fields/m-p/1077349#M73797</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-07-09T17:08:25Z</dc:date>
    </item>
  </channel>
</rss>

