<?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: View fields from related table in popup and concatenate in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1366155#M56649</link>
    <description>&lt;P&gt;Ok, after many, many iterations (and a little help from Chat GTP) , I finally managed to crack it. For the benefit of other newbs like me, here is my Arcade code...&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var relatedRecords = FeatureSetByRelationshipName($feature, 'Taxa');
var displayString = '';

// Loop through related records
for (var record in relatedRecords) {
    displayString += record['Genus'] +' '+ record['species'];
}

// Display the generated string in the popup
return displayString;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Cheers, Damian&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2024 07:34:06 GMT</pubDate>
    <dc:creator>Damian</dc:creator>
    <dc:date>2024-01-04T07:34:06Z</dc:date>
    <item>
      <title>View fields from related table in popup and concatenate</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365224#M56581</link>
      <description>&lt;P&gt;Dear AGOL Communitity&lt;/P&gt;&lt;P&gt;I'm trying to write an expression to view two text fields from a related table in a pop up in a WebMap. I also want to concatenate those two fields so they appear a custom field. I am a total novice at writing Arcade expressions.&amp;nbsp;Hoping someone can help.&lt;/P&gt;&lt;P&gt;My primary feature dataset is called 'Distributions'&lt;/P&gt;&lt;P&gt;My related table is called 'Taxa'&lt;/P&gt;&lt;P&gt;The two fields I want to concatenate from my Taxa table are called 'Genus' and 'Species'&lt;/P&gt;&lt;P&gt;Hoping someone can help&lt;/P&gt;&lt;P&gt;Regards, Damian&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jan 2024 07:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365224#M56581</guid>
      <dc:creator>Damian</dc:creator>
      <dc:date>2024-01-01T07:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: View fields from related table in popup and concatenate</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365272#M56582</link>
      <description>&lt;P&gt;Learning Arcade can be a steep learning curve. I use this&amp;nbsp;&lt;A href="https://developers.arcgis.com/arcade/function-reference/" target="_blank"&gt;https://developers.arcgis.com/arcade/function-reference/&lt;/A&gt;&amp;nbsp;a lot.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Succes!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 08:24:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365272#M56582</guid>
      <dc:creator>Gisbert61</dc:creator>
      <dc:date>2024-01-02T08:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: View fields from related table in popup and concatenate</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365624#M56604</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417320"&gt;@Damian&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;To help you get started, here is a link to a Story map on writing some basic expressions in Arcade: &lt;A href="https://storymaps.arcgis.com/stories/2240af05fbfc45ddbf421e7d50b05333" target="_blank" rel="noopener"&gt;What is&amp;nbsp;Arcade and why use it&lt;/A&gt;&lt;/P&gt;&lt;P&gt;To fetch the attributes from a related table, here is a link to a blog post that goes over some common expressions. See section 2: &lt;A href="https://www.esri.com/arcgis-blog/products/field-maps/field-mobility/common-calculated-expressions-for-arcgis-field-maps/" target="_self"&gt;Fetch an attribute from a related record.&lt;/A&gt;&amp;nbsp;The blog has sample code to help you get started. You can copy and paste the code, then change the name(s) of the dataset/relationship/field(s) to match your dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, you can display attributes from related records in pop-ups without the use of Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When configuring your popup, click&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;+&lt;STRONG&gt;Add Content&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;then&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Related Records&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;and select your related table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 22:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1365624#M56604</guid>
      <dc:creator>EmilyGeo</dc:creator>
      <dc:date>2024-01-02T22:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: View fields from related table in popup and concatenate</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1366155#M56649</link>
      <description>&lt;P&gt;Ok, after many, many iterations (and a little help from Chat GTP) , I finally managed to crack it. For the benefit of other newbs like me, here is my Arcade code...&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var relatedRecords = FeatureSetByRelationshipName($feature, 'Taxa');
var displayString = '';

// Loop through related records
for (var record in relatedRecords) {
    displayString += record['Genus'] +' '+ record['species'];
}

// Display the generated string in the popup
return displayString;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Cheers, Damian&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 07:34:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/view-fields-from-related-table-in-popup-and/m-p/1366155#M56649</guid>
      <dc:creator>Damian</dc:creator>
      <dc:date>2024-01-04T07:34:06Z</dc:date>
    </item>
  </channel>
</rss>

