<?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: Configuring a popup with related tables using Arcade. in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/configuring-a-popup-with-related-tables-using/m-p/1094578#M41969</link>
    <description>&lt;P&gt;Instead of just grabbing the first record of your result set, you want to iterate through the set to get all the related records from your table.&amp;nbsp; This blog article (link below) looks like it does a nice job of walking through the process of getting all related records and adding the results to a pop-up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-blog/show-related-data-or-tables-in-pop-ups-with-arcade/ba-p/890530" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-blog/show-related-data-or-tables-in-pop-ups-with-arcade/ba-p/890530&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Leon&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 18:28:27 GMT</pubDate>
    <dc:creator>LeonS</dc:creator>
    <dc:date>2021-09-01T18:28:27Z</dc:date>
    <item>
      <title>Configuring a popup with related tables using Arcade.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/configuring-a-popup-with-related-tables-using/m-p/1094068#M41960</link>
      <description>&lt;P&gt;Hello, this is actually my first post and I'm also new to Arcade, so hopefully I'm in the right place.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a parent feature layer called "File_Number"&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColeNelson62077_1-1630429362578.png" style="width: 783px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22098iE7A1E9F85095E9F2/image-dimensions/783x89?v=v2" width="783" height="89" role="button" title="ColeNelson62077_1-1630429362578.png" alt="ColeNelson62077_1-1630429362578.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and a child table called "Occupancy"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ColeNelson62077_2-1630429473440.png" style="width: 811px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22099i1D32629B1AF163BA/image-dimensions/811x292?v=v2" width="811" height="292" role="button" title="ColeNelson62077_2-1630429473440.png" alt="ColeNelson62077_2-1630429473440.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've created a 1:M relationship class for them, using their File Number fields in ArcGIS Pro, and then uploaded them to ArcGIS Online.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying do is configure the popup for the &lt;STRONG&gt;File Number&lt;/STRONG&gt; feature layer to display &lt;STRONG&gt;all of the occupants&lt;/STRONG&gt; associated with each file number from the &lt;STRONG&gt;Occupancy&lt;/STRONG&gt; table.&amp;nbsp; The occupants are found in the Building column which I circled in the screenshot.&amp;nbsp; Here is a code that I found on the internet and&amp;nbsp; have been currently working with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var occupants = OrderBy(FeatureSetByRelationshipName($feature,"ISRB_WebMapFeatures.DBO.Occupancy"), "Building");&lt;BR /&gt;var cnt = Count(occupants);&lt;BR /&gt;var occupancy = "";&lt;BR /&gt;if (cnt &amp;gt; 0) { var info = First(occupants);&lt;BR /&gt;occupancy = info.Building;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return occupancy;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will almost do what I want, however I want all the values from the Building field associated with the file number, not just the first one.&amp;nbsp; I'm assuming it has to do with the &lt;STRONG&gt;First&lt;/STRONG&gt;&amp;nbsp;global, however whenever I try to remove it or try anything else I get an error.&amp;nbsp; Any help would be greatly appreciated and thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 17:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/configuring-a-popup-with-related-tables-using/m-p/1094068#M41960</guid>
      <dc:creator>ColeNelson62077</dc:creator>
      <dc:date>2021-08-31T17:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Configuring a popup with related tables using Arcade.</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/configuring-a-popup-with-related-tables-using/m-p/1094578#M41969</link>
      <description>&lt;P&gt;Instead of just grabbing the first record of your result set, you want to iterate through the set to get all the related records from your table.&amp;nbsp; This blog article (link below) looks like it does a nice job of walking through the process of getting all related records and adding the results to a pop-up.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-online-blog/show-related-data-or-tables-in-pop-ups-with-arcade/ba-p/890530" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-blog/show-related-data-or-tables-in-pop-ups-with-arcade/ba-p/890530&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Leon&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 18:28:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/configuring-a-popup-with-related-tables-using/m-p/1094578#M41969</guid>
      <dc:creator>LeonS</dc:creator>
      <dc:date>2021-09-01T18:28:27Z</dc:date>
    </item>
  </channel>
</rss>

