<?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 Map Viewer 'Create Related Record' not carrying over primary key to foreign key in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1405897#M58474</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I created a 1:M relationship class between a point layer (origin) and a table (destination). &lt;U&gt;&lt;EM&gt;EDIT: In the same gdb I have a 1:M relationship class between a polygon layer (orgin) and the same table as above (destination).&lt;/EM&gt; &lt;/U&gt;Both relationships are set up with the primary key as the GlobalID (in the point and polygon layer) and foreign key as a created GUID field Log_GUID. The gdb was created in ArcGIS Pro then published to AGOL as a hosted feature layer. The relationship works as expected in Pro, but after publishing to AGOL the primary key does not copy to the foreign key when creating a new related record.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make it even weirder, when creating the record in the form, the primary key copies(!) but as soon as I submit the record the primary key disappears and leaves the field blank. See images below:&lt;/P&gt;&lt;P&gt;1. Relationship class setup in pro before publishing to AGOL:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_0-1712249962084.png" style="width: 209px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100081i3AE487F7518A491C/image-dimensions/209x215?v=v2" width="209" height="215" role="button" title="Kklitt_0-1712249962084.png" alt="Kklitt_0-1712249962084.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Create new record in Map Viewer using forms:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_1-1712250133920.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100082i0443598C565A4A32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_1-1712250133920.png" alt="Kklitt_1-1712250133920.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Form populates with the correct primary key into the foreign key field&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_2-1712250167430.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100083i826F215E3066EEB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_2-1712250167430.png" alt="Kklitt_2-1712250167430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Data is created without any error but not related to origin layer. The primary key doesn't carry over to the foreign key.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_3-1712250251255.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100084i509B067C70E7E455/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_3-1712250251255.png" alt="Kklitt_3-1712250251255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this happening? It seems like it's working fine until I actually submit the form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2024 12:20:58 GMT</pubDate>
    <dc:creator>Kklitt</dc:creator>
    <dc:date>2024-04-10T12:20:58Z</dc:date>
    <item>
      <title>Map Viewer 'Create Related Record' not carrying over primary key to foreign key</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1405897#M58474</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I created a 1:M relationship class between a point layer (origin) and a table (destination). &lt;U&gt;&lt;EM&gt;EDIT: In the same gdb I have a 1:M relationship class between a polygon layer (orgin) and the same table as above (destination).&lt;/EM&gt; &lt;/U&gt;Both relationships are set up with the primary key as the GlobalID (in the point and polygon layer) and foreign key as a created GUID field Log_GUID. The gdb was created in ArcGIS Pro then published to AGOL as a hosted feature layer. The relationship works as expected in Pro, but after publishing to AGOL the primary key does not copy to the foreign key when creating a new related record.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To make it even weirder, when creating the record in the form, the primary key copies(!) but as soon as I submit the record the primary key disappears and leaves the field blank. See images below:&lt;/P&gt;&lt;P&gt;1. Relationship class setup in pro before publishing to AGOL:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_0-1712249962084.png" style="width: 209px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100081i3AE487F7518A491C/image-dimensions/209x215?v=v2" width="209" height="215" role="button" title="Kklitt_0-1712249962084.png" alt="Kklitt_0-1712249962084.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Create new record in Map Viewer using forms:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_1-1712250133920.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100082i0443598C565A4A32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_1-1712250133920.png" alt="Kklitt_1-1712250133920.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Form populates with the correct primary key into the foreign key field&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_2-1712250167430.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100083i826F215E3066EEB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_2-1712250167430.png" alt="Kklitt_2-1712250167430.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Data is created without any error but not related to origin layer. The primary key doesn't carry over to the foreign key.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kklitt_3-1712250251255.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/100084i509B067C70E7E455/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kklitt_3-1712250251255.png" alt="Kklitt_3-1712250251255.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why is this happening? It seems like it's working fine until I actually submit the form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:20:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1405897#M58474</guid>
      <dc:creator>Kklitt</dc:creator>
      <dc:date>2024-04-10T12:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer 'Create Related Record' not carrying over primary key to foreign key</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1406722#M58516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/92887"&gt;@Kklitt&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does seem odd. We'll need more information in order to see what's going on. I recommend reaching&amp;nbsp;out to tech support to get a ticket started so we can investigate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the mean time, if you can share a link to your map with me I'll take a look at it.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Apr 2024 00:29:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1406722#M58516</guid>
      <dc:creator>EmilyGeo</dc:creator>
      <dc:date>2024-04-06T00:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Map Viewer 'Create Related Record' not carrying over primary key to foreign key</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1407927#M58566</link>
      <description>&lt;P&gt;I found the answer here:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-collector-questions/multiple-feature-classes-to-one-related-table/td-p/641533" target="_blank"&gt;Multiple Feature Classes to One Related Table - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When multiple feature classes are related to &lt;STRONG&gt;one table&lt;/STRONG&gt; in a gdb and the&lt;STRONG&gt; end goal&lt;/STRONG&gt; is for it to work in the AGOL environment, multiple GUID fields need to be created for each relationship class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, with the issue I laid out above, I had to create two separate GUID fields in my table for each feature class that's related:&lt;/P&gt;&lt;P&gt;Point feature class --&amp;gt; Table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Primary key = GlobalID&lt;/LI&gt;&lt;LI&gt;Foreign key = Point_GUID&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Polygon feature class --&amp;gt; Table&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Primary key = GlobalID&lt;/LI&gt;&lt;LI&gt;Foreign key = Polygon_GUID&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/585739"&gt;@EmilyGeo&lt;/a&gt;&amp;nbsp;Is this normal behavior? And if so, it'd be &lt;U&gt;super&lt;/U&gt; helpful (and a huge time savor) to have this mentioned in&amp;nbsp;the documentation. This was especially confusing since it worked as expected in ArcGIS Pro with one general foreign key (Log_GUID) and looked like it was going to work in AGOL (primary key copied in the form) but never actually did.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2024 12:35:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/map-viewer-create-related-record-not-carrying-over/m-p/1407927#M58566</guid>
      <dc:creator>Kklitt</dc:creator>
      <dc:date>2024-04-10T12:35:07Z</dc:date>
    </item>
  </channel>
</rss>

