<?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 Feature-Set Works but Does Not Display in Popup in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262306#M12842</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;We recently constructed an Arcade expression using Feature-Sets. The arcade expression validates but does not display in the popup. It's a simple text string that should display. Even if we change the return to an arbitrary word like "test" it still does not display in the popup. Please see images below. Expression is in text form at the bottom of the post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other arcade expressions work fine in this web map and popup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explanation of the expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're displaying a string of text that falls under three parameters &lt;EM&gt;NotesOrObservation&lt;/EM&gt; is Observation, &lt;EM&gt;SpeciesType&lt;/EM&gt;&amp;nbsp;is House Wren, and &lt;EM&gt;DateofObservation&lt;/EM&gt; is Current Year. Since "AND" statements &lt;A _jive_internal="true" href="https://community.esri.com/thread/218336-arcade-if-statements-with-and-or-or"&gt;don't seem to be a supported Arcade function&lt;/A&gt; we used the below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Feature-Set is looking&amp;nbsp;at the related table in the map&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Sorting by "&lt;EM&gt;DateOfObservation&lt;/EM&gt;" date descending&lt;/P&gt;&lt;P&gt;-&amp;nbsp; If parameter is met "Yes" is returned&lt;/P&gt;&lt;P&gt;- Return is a concatenation of three parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; example) If all three parameters are Yes then "yesyesyes" is returned&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arcade Expression and Result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439184" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/439184_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Expression in popup configuration:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439185" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/439185_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup Blank Return:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439186" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/439186_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;var Related= FeatureSetByName($datastore,"BlueBird_Boxes_Records")&lt;BR /&gt;var sort = OrderBy(Related, "DateOfObservation Desc")&lt;BR /&gt;var top1= Top(sort, 1)&lt;BR /&gt;for (var x in top1){var species = x.SpeciesType; var NoteOB = x.NotesorObservation;var DateOB = x.DateOfObservation}&lt;BR /&gt;var yesno = ''&lt;BR /&gt;iif (species == 'House Wren', yesno += 'yes', yesno +='no')&lt;BR /&gt;iif (NoteOB == 'Observation', yesno += 'yes', yesno +='no')&lt;BR /&gt;iif (Year(DateOB) == Year(Now()), yesno += 'yes', yesno +='no')&lt;/P&gt;&lt;P&gt;return yesno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Mar 2019 21:30:45 GMT</pubDate>
    <dc:creator>Amanda__Huber</dc:creator>
    <dc:date>2019-03-11T21:30:45Z</dc:date>
    <item>
      <title>Arcade Feature-Set Works but Does Not Display in Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262306#M12842</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;We recently constructed an Arcade expression using Feature-Sets. The arcade expression validates but does not display in the popup. It's a simple text string that should display. Even if we change the return to an arbitrary word like "test" it still does not display in the popup. Please see images below. Expression is in text form at the bottom of the post.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other arcade expressions work fine in this web map and popup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Explanation of the expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're displaying a string of text that falls under three parameters &lt;EM&gt;NotesOrObservation&lt;/EM&gt; is Observation, &lt;EM&gt;SpeciesType&lt;/EM&gt;&amp;nbsp;is House Wren, and &lt;EM&gt;DateofObservation&lt;/EM&gt; is Current Year. Since "AND" statements &lt;A _jive_internal="true" href="https://community.esri.com/thread/218336-arcade-if-statements-with-and-or-or"&gt;don't seem to be a supported Arcade function&lt;/A&gt; we used the below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Feature-Set is looking&amp;nbsp;at the related table in the map&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Sorting by "&lt;EM&gt;DateOfObservation&lt;/EM&gt;" date descending&lt;/P&gt;&lt;P&gt;-&amp;nbsp; If parameter is met "Yes" is returned&lt;/P&gt;&lt;P&gt;- Return is a concatenation of three parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; example) If all three parameters are Yes then "yesyesyes" is returned&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Arcade Expression and Result:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439184" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/439184_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Expression in popup configuration:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439185" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/439185_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Popup Blank Return:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="439186" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/439186_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;var Related= FeatureSetByName($datastore,"BlueBird_Boxes_Records")&lt;BR /&gt;var sort = OrderBy(Related, "DateOfObservation Desc")&lt;BR /&gt;var top1= Top(sort, 1)&lt;BR /&gt;for (var x in top1){var species = x.SpeciesType; var NoteOB = x.NotesorObservation;var DateOB = x.DateOfObservation}&lt;BR /&gt;var yesno = ''&lt;BR /&gt;iif (species == 'House Wren', yesno += 'yes', yesno +='no')&lt;BR /&gt;iif (NoteOB == 'Observation', yesno += 'yes', yesno +='no')&lt;BR /&gt;iif (Year(DateOB) == Year(Now()), yesno += 'yes', yesno +='no')&lt;/P&gt;&lt;P&gt;return yesno&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Mar 2019 21:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262306#M12842</guid>
      <dc:creator>Amanda__Huber</dc:creator>
      <dc:date>2019-03-11T21:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Feature-Set Works but Does Not Display in Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262307#M12843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try using if-else in your expression instead of iif.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Russ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 17:31:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262307#M12843</guid>
      <dc:creator>RussRoberts</dc:creator>
      <dc:date>2019-03-12T17:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Feature-Set Works but Does Not Display in Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262308#M12844</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/13935"&gt;Russell Roberts&lt;/A&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your quick response.&lt;/P&gt;&lt;P&gt;It&amp;nbsp;does look&amp;nbsp;like switching it to an&amp;nbsp;&lt;EM&gt;if-else &lt;/EM&gt;instead of&lt;EM&gt; iif&lt;/EM&gt;&amp;nbsp;works!&amp;nbsp;Do you know if there is a reason for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 18:26:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/262308#M12844</guid>
      <dc:creator>Amanda__Huber</dc:creator>
      <dc:date>2019-03-18T18:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Feature-Set Works but Does Not Display in Popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/1214365#M47976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/17874"&gt;@RussRoberts&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I can see that it is a bit old discussion but I have the same problem. I have written Arcade expression which validates in console and I can see a result, but the field is empty in pop-up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any other arcade expressions work fine in this web map and popup.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What the script does is getting an url attribute from related table. As the relation is 1:M, I want to get all the urls and display them in separate fields. That's why I create a list and then refer to lists items.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I attach pictures and the code. I would really appreciate any help.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AZietara_0-1663704096182.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51673i1EF6CA2304B47825/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AZietara_0-1663704096182.png" alt="AZietara_0-1663704096182.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AZietara_1-1663704103160.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51674iDDFDBE181EC06E30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AZietara_1-1663704103160.png" alt="AZietara_1-1663704103160.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AZietara_2-1663704107852.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/51675iCDF2474D1F86B757/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AZietara_2-1663704107852.png" alt="AZietara_2-1663704107852.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var mygid = Text($feature.gid);
var related_table = FeatureSetByName($map, 'imagesFGB')
var filter_query = "gid  = " + mygid + " ";

var rd_filtered = Filter(related_table, filter_query);
var rdf_count = Count(rd_filtered);
var result = ""
var result1 = ""

if (rdf_count == 1) {
    for (var rd_row in rd_filtered) {
          var result = rd_row.url;
    }
}

if (rdf_count &amp;gt;1) {
    for (var rd_row in rd_filtered) {
          result1 += rd_row.url + ',';
    }
    var res = Split(result1,',')
    var result = res[0]
}

else  {
    var result = "ingen bilder";
}

return result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 20:04:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-feature-set-works-but-does-not-display-in/m-p/1214365#M47976</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-09-20T20:04:09Z</dc:date>
    </item>
  </channel>
</rss>

