<?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 Display parent fields in child record pop up in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1065337#M40456</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to display a parent field in a child record pop-up and have not had any success, is this possible? I know it is possible to show child record info in the parent pop-up so I would assume the opposite is also possible. For my project I have site records which have an ID it has a 1:M relationship with it's child records, for example pipes and meters. The users are using field maps and want to be able to select the child record (such as a pipe) and to view the site record ID it is related to. Is it possible to add this information to the pop-up or as a label on the child feature?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Hayleigh&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jun 2021 22:51:59 GMT</pubDate>
    <dc:creator>HayleighFisher</dc:creator>
    <dc:date>2021-06-04T22:51:59Z</dc:date>
    <item>
      <title>Display parent fields in child record pop up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1065337#M40456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have been trying to display a parent field in a child record pop-up and have not had any success, is this possible? I know it is possible to show child record info in the parent pop-up so I would assume the opposite is also possible. For my project I have site records which have an ID it has a 1:M relationship with it's child records, for example pipes and meters. The users are using field maps and want to be able to select the child record (such as a pipe) and to view the site record ID it is related to. Is it possible to add this information to the pop-up or as a label on the child feature?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Hayleigh&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 22:51:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1065337#M40456</guid>
      <dc:creator>HayleighFisher</dc:creator>
      <dc:date>2021-06-04T22:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Display parent fields in child record pop up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1065504#M40465</link>
      <description>&lt;P&gt;You can certainly do this for the popup. However, you cannot do this for the label. The labeling profile in Arcade does not permit access outside of the individual feature being labelled.&lt;/P&gt;&lt;P&gt;In the popup, though, you can use any of the &lt;STRONG&gt;FeatureSetBy&lt;/STRONG&gt; functions to get the parent layer. There is a function &lt;STRONG&gt;FeatureSetByRelationShipName, &lt;/STRONG&gt;which is ideal for this. Rather than returning the entire layer as a FeatureSet, you instead get the subset of related records based on the input feature.&lt;/P&gt;&lt;P&gt;As you are going child -&amp;gt; parent in a 1:M relationship, you know you'll only have one record to deal with, so you can immediately call &lt;STRONG&gt;First&lt;/STRONG&gt; on the returned FeatureSet to get the &lt;STRONG&gt;Feature&lt;/STRONG&gt; itself.&lt;/P&gt;&lt;P&gt;Here's an expression written for the popup of an amenity inspection. Like your situation, it's a 1:M relationship between individual amenities and their periodic inspections. To grab, say, the name of the amenity and the preserve the amenity is located within, I use the following:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var id = $feature.guid

var rel_fs = FeatureSetByRelationshipName($feature,"ForestPreserveAmenities", ['name', 'forestpreserve'], false)

var parent = First(rel_fs)

return parent.name + ' in ' + parent.forestpreserve&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Which returns:&lt;/P&gt;&lt;PRE&gt;Parking in Blackberry Creek&lt;/PRE&gt;&lt;P&gt;If you've not used the &lt;STRONG&gt;FeatureSetByRelationshipName&lt;/STRONG&gt; function before and are unsure of the 'relationship name' parameter, not to worry. In the expression builder built into the map viewer, you can find it in &lt;STRONG&gt;Globals -&amp;gt; Feature -&amp;gt; Related Records (at the bottom of the fields list) -&amp;gt; Relationship&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1623033728852.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15285iD467070AC4D2F77E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1623033728852.png" alt="jcarlson_0-1623033728852.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_1-1623033767410.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15286iD2F5046A9904F271/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_1-1623033767410.png" alt="jcarlson_1-1623033767410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Just click the blue link under the relationship to insert it into your expression.&lt;/P&gt;&lt;P&gt;If you just need a field or two, consider adding the &lt;STRONG&gt;fields&lt;/STRONG&gt; and &lt;STRONG&gt;includeGeometry&lt;/STRONG&gt; parameters to improve performance, though with a single record, it's likely to be a minimal difference.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 02:45:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1065504#M40465</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-06-07T02:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Display parent fields in child record pop up</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1067532#M40577</link>
      <description>&lt;P&gt;Hi Josh,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the reply! This worked for me, however I did run into the issue where the Expression wouldn't save if there was data missing from the parent record. In order to bypass this I had to edit the web map json directly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Hayleigh&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 20:06:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/display-parent-fields-in-child-record-pop-up/m-p/1067532#M40577</guid>
      <dc:creator>HayleighFisher</dc:creator>
      <dc:date>2021-06-11T20:06:42Z</dc:date>
    </item>
  </channel>
</rss>

