<?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 Simple Arcade Question in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308092#M53362</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am new to Arcade programming and I have a simple question:&lt;/P&gt;&lt;P&gt;This is a standard scenario: I have created a feature point layer and a related table for use in Field Maps. This is a one-to-many relationship. Someone has gone out and collected multiple records for each point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Map Viewer, I would like the pop-up for the point layer to display the number of records for that point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the point layer's pop-up configuration I enter the following expression:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;relRecord&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByRelationshipName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Rel_table"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;cnt&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Count&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;relRecord&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;cnt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;P&gt;When I click on any point the total number of records is always 1, even though there are always more than one.&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 21:46:21 GMT</pubDate>
    <dc:creator>YS2388</dc:creator>
    <dc:date>2023-07-13T21:46:21Z</dc:date>
    <item>
      <title>Simple Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308092#M53362</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I am new to Arcade programming and I have a simple question:&lt;/P&gt;&lt;P&gt;This is a standard scenario: I have created a feature point layer and a related table for use in Field Maps. This is a one-to-many relationship. Someone has gone out and collected multiple records for each point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Map Viewer, I would like the pop-up for the point layer to display the number of records for that point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the point layer's pop-up configuration I enter the following expression:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;relRecord&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;FeatureSetByRelationshipName&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Rel_table"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;cnt&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;Count&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;relRecord&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;cnt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/DIV&gt;&lt;P&gt;When I click on any point the total number of records is always 1, even though there are always more than one.&lt;/P&gt;&lt;P&gt;Thank you for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 21:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308092#M53362</guid>
      <dc:creator>YS2388</dc:creator>
      <dc:date>2023-07-13T21:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308399#M53384</link>
      <description>&lt;P&gt;Hmm, does it work if you filter the related table yourself?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var rel_fs = FeaturesetByPortalItem(...)
var common_val = $feature.CommonField
var rel_rows = Filter(rel_fs, "CommonField = @common_Val")
return Count(rel_rows)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 15 Jul 2023 00:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308399#M53384</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-07-15T00:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Arcade Question</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308688#M53403</link>
      <description>&lt;P&gt;Hi Johannes,&lt;/P&gt;&lt;P&gt;Thanks for the suggestion. I tried filtering and still have only the first record returned.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 17:10:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/simple-arcade-question/m-p/1308688#M53403</guid>
      <dc:creator>YS2388</dc:creator>
      <dc:date>2023-07-17T17:10:37Z</dc:date>
    </item>
  </channel>
</rss>

