<?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 Arcade expression to control if popup opens or not? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256348#M50247</link>
    <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;Wondering if an Arcade expression could control if a Popup opens or not?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on selection of Feature,&amp;nbsp; if Attribute is NULL then open Popup else do not open Popup.&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;p&lt;/P&gt;</description>
    <pubDate>Wed, 08 Feb 2023 23:18:35 GMT</pubDate>
    <dc:creator>Paco</dc:creator>
    <dc:date>2023-02-08T23:18:35Z</dc:date>
    <item>
      <title>Arcade expression to control if popup opens or not?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256348#M50247</link>
      <description>&lt;P&gt;Hello all!&lt;/P&gt;&lt;P&gt;Wondering if an Arcade expression could control if a Popup opens or not?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on selection of Feature,&amp;nbsp; if Attribute is NULL then open Popup else do not open Popup.&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;p&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 23:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256348#M50247</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2023-02-08T23:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control if popup opens or not?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256500#M50258</link>
      <description>&lt;P&gt;The short answer is "no". Enabling popups is done at the layer level, and cannot be dynamically toggled per feature.&lt;/P&gt;&lt;P&gt;You &lt;EM&gt;could &lt;/EM&gt;have an Arcade expression that simply hides the popup &lt;STRONG&gt;contents&lt;/STRONG&gt; for certain features. It would still give you a blank popup, though.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 14:49:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256500#M50258</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-02-09T14:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control if popup opens or not?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256530#M50260</link>
      <description>&lt;P&gt;Yep.&amp;nbsp; i kindof had a feeling.&amp;nbsp; &amp;nbsp;do we think there's a way to option the Arcade expression to put the popup I want,&amp;nbsp; "on top" of the popup list?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;"if attribute is YES, open popup first(on top), then remove all other attributes from the undesired feature popups below it"&amp;nbsp; &amp;nbsp;leaving one attributed popup and a list of blank popups 'below' it.&lt;/P&gt;&lt;P&gt;or any other ideas?!&amp;nbsp; &amp;nbsp; thanks all!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 15:58:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256530#M50260</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2023-02-09T15:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression to control if popup opens or not?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256543#M50261</link>
      <description>&lt;P&gt;Unfortunately, no. The popups seem to only go in descending order on the objectid, regardless of your layer's feature display order. So the newest feature's popup will show up first, no matter what.&lt;/P&gt;&lt;P&gt;Now, you &lt;EM&gt;could &lt;/EM&gt;do something like load the map into an app that combines all the popups into a single panel, like Zone Lookup or something. Here's an example. I have three overlapping features. One of them has an integer field set to &lt;STRONG&gt;1&lt;/STRONG&gt;, the others are at &lt;STRONG&gt;0&lt;/STRONG&gt;. I will use the following Arcade element in the popup:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if ($feature.some_int == 1) {
	return { 
		type : 'text', 
		text : 'Here is the popup I want'
	}
}&lt;/LI-CODE&gt;&lt;P&gt;This results in a popup that for the 0s is completely blank.&lt;/P&gt;&lt;P&gt;Now I load this map into a Zone Lookup App.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1675959959380.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62441iA2A5C197B937DF3F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1675959959380.png" alt="jcarlson_1-1675959959380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This leaves you with those pesky blank boxes, but you still get a single location for all your popups, and the one with the desired attribute will show up somewhere in the list.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 16:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-expression-to-control-if-popup-opens-or-not/m-p/1256543#M50261</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-02-09T16:27:06Z</dc:date>
    </item>
  </channel>
</rss>

