<?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: Attempting to use logical functions to determine when fields appear on pop-up. in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/attempting-to-use-logical-functions-to-determine/m-p/497273#M25067</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/370117"&gt;Quang Tran&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately&amp;nbsp;how you want the expression to work,&amp;nbsp;is not the way the function works. When your expression returns an empty string the empty string will be shown together with the name of the expression ("custom" in your case).&amp;nbsp; In ArcGIS Pro you would be able to create HTML in your expression and create the visualization as you want to obtain, but in ArcGIS Online, this is not possible (yet?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a different way to do this, but it will require more work and more expressions. You can create a custom HTML pop-up and embed&amp;nbsp;Arcade expressions in the html and force elements to be hidden if for instance a field is empty or does not have a value you want to show. An example you can find here:&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups#comment-66670" title="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups#comment-66670"&gt;https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-p…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Jul 2019 12:42:50 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2019-07-30T12:42:50Z</dc:date>
    <item>
      <title>Attempting to use logical functions to determine when fields appear on pop-up.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attempting-to-use-logical-functions-to-determine/m-p/497272#M25066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have successfully created a logical function using IIF but the end result is not appearing as I'd like.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed this previously asked question:&lt;A _jive_internal="true" href="https://community.esri.com/thread/225577-arcade-expressions-conditionals-and-popups" target="_blank"&gt;https://community.esri.com/thread/225577-arcade-expressions-conditionals-and-popups&lt;/A&gt;&amp;nbsp;as what I want is similar. It seems like using the IIF would not cause my expression to show up on the pop-up if it was FALSE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is my expression. The expression is labelled "Custom"&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&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;&lt;SPAN class="string token"&gt;"TYPE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'STRAW'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TYPE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&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="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent;"&gt;The function works as expected and it returns this on my pop-up&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" style="border: 1px solid #c6c6c6;" width="100%"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH&gt;Field&lt;/TH&gt;&lt;TH&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Custom&lt;/TD&gt;&lt;TD&gt;STRAW&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="background-color: transparent;"&gt;My issue though is if $feature["TYPE"] != 'STRAW' my pop-up displays&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE class="j-table jiveBorder" height="70" style="border: 1px solid #c6c6c6;" width="470"&gt;&lt;THEAD&gt;&lt;TR style="background-color: #efefef;"&gt;&lt;TH style="width: 388px;"&gt;Field&lt;/TH&gt;&lt;TH style="width: 59px;"&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="width: 388px;"&gt;Custom&lt;/TD&gt;&lt;TD style="width: 59px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;What I want is if it is False for it not to appear on my pop-up. What am I doing wrong or misunderstanding?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:51:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attempting-to-use-logical-functions-to-determine/m-p/497272#M25066</guid>
      <dc:creator>deleted-user-VlUAfOaDHQ3-</dc:creator>
      <dc:date>2021-12-11T21:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to use logical functions to determine when fields appear on pop-up.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attempting-to-use-logical-functions-to-determine/m-p/497273#M25067</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/370117"&gt;Quang Tran&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately&amp;nbsp;how you want the expression to work,&amp;nbsp;is not the way the function works. When your expression returns an empty string the empty string will be shown together with the name of the expression ("custom" in your case).&amp;nbsp; In ArcGIS Pro you would be able to create HTML in your expression and create the visualization as you want to obtain, but in ArcGIS Online, this is not possible (yet?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a different way to do this, but it will require more work and more expressions. You can create a custom HTML pop-up and embed&amp;nbsp;Arcade expressions in the html and force elements to be hidden if for instance a field is empty or does not have a value you want to show. An example you can find here:&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups#comment-66670" title="https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-pop-ups#comment-66670"&gt;https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2017/07/18/conditional-field-display-with-arcade-in-p…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2019 12:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attempting-to-use-logical-functions-to-determine/m-p/497273#M25067</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-07-30T12:42:50Z</dc:date>
    </item>
  </channel>
</rss>

