<?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: Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342425#M74516</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parent_key = "GlobalID"
child_key = "ParentID"
parent_fields = [parent_key, "fields", "to", "copy"]
child_fields = [child_key, "into", "the", "child"]

# Start an edit session if needed
with arcpy.da.UpdateCursor("parent_table", parent_fields) as update, arcpy.da.InsertCursor("child_table", child_fields) as insert:
    for row in update:
        insert.insertRow(row)
        update.updateRow([row[0]] + [None] * (len(row) - 1))
# Close the edit session if needed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Untested, but this should simultaneously create related records with the relevant fields while nulling out the old data to avoid confusion.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Oct 2023 23:53:20 GMT</pubDate>
    <dc:creator>DavidSolari</dc:creator>
    <dc:date>2023-10-26T23:53:20Z</dc:date>
    <item>
      <title>Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1341692#M74444</link>
      <description>&lt;P&gt;I’m working on modernizing our Planning and Zoning map. The way it is currently set up is that there are attribute fields set up for Rezones, Special Use Permits, and Variances. It has worked well enough, but the problem is that storing them via attribute has meant that we can only have the most recent record. A parcel can be rezoned many times and have multiple different conditional uses applied to it, so this is less than ideal because of that. I created a relationship class to a table that will hold those going forward. The challenge I am facing is migrating our old data to the new relationship class. I can’t seem to find a way to move that data that is currently in the zoning feature class into the related table. The only way I’ve seen so far would be to manually enter that data for all 2000+ records, which would be quite a time sink. Is there a more efficient way to do this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2023 21:15:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1341692#M74444</guid>
      <dc:creator>MDB_GIS</dc:creator>
      <dc:date>2023-10-25T21:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342067#M74481</link>
      <description>&lt;P&gt;Just thinking off the top of my head here, but could you perhaps make a copy of your feature class to a table? Then you delete any field you don't need and are left with just your Rezone field and some unique ID you can use for the relationship. Then you delete the Rezone field from your main feature class and you're done.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 15:47:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342067#M74481</guid>
      <dc:creator>NiekGoorman1</dc:creator>
      <dc:date>2023-10-26T15:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342084#M74484</link>
      <description>&lt;P&gt;There is a workflow to add selected records to a relationship class &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-relationships.htm#GUID-D7F2A7A0-26D0-4923-A425-DA20992F9E56" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp; Question - are you using a file geodatabase or an enterprise geodatabase?&amp;nbsp; If an eGDB, then there's a workflow called &lt;A href="https://www.esri.com/training/catalog/57630435851d31e02a43efb0/archiving-data-in-a-multiuser-geodatabase/" target="_self"&gt;archiving&lt;/A&gt; that tracks the "life" of a feature over time so you can see the changes (i.e. zoning changes).&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 15:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342084#M74484</guid>
      <dc:creator>Robert_LeClair</dc:creator>
      <dc:date>2023-10-26T15:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342425#M74516</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;parent_key = "GlobalID"
child_key = "ParentID"
parent_fields = [parent_key, "fields", "to", "copy"]
child_fields = [child_key, "into", "the", "child"]

# Start an edit session if needed
with arcpy.da.UpdateCursor("parent_table", parent_fields) as update, arcpy.da.InsertCursor("child_table", child_fields) as insert:
    for row in update:
        insert.insertRow(row)
        update.updateRow([row[0]] + [None] * (len(row) - 1))
# Close the edit session if needed&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Untested, but this should simultaneously create related records with the relevant fields while nulling out the old data to avoid confusion.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2023 23:53:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1342425#M74516</guid>
      <dc:creator>DavidSolari</dc:creator>
      <dc:date>2023-10-26T23:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an easy way to populate a new related table with data that is currently stored as an attribute of another feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1344141#M74693</link>
      <description>&lt;P&gt;I figured out how to do this. Here are the steps I followed:&lt;/P&gt;&lt;P&gt;1. make sure that your target table has Global IDs enabled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Set up your related table to have all the fields that will hold the data you are looking to migrate from the old layer. You will also need a field using the "type" GUID.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Create the relationship class using the GlobalID from your main table and the GUID field from the related table as the primary key.&amp;nbsp;&lt;/P&gt;&lt;P&gt;4. Either export the old table you want to migrate to an excel file or copy it to an excel file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;5. Rearrange the table in excel to where the format matches your new related table EXACTLY. You should have the same number of columns and all the data types should be the same. (Ensure text items are formated as "text" in excel instead of general.&amp;nbsp;&lt;/P&gt;&lt;P&gt;6. When your excel table matches the format of your related feature class, you can copy the data from excel and paste it over a blank row of the attribute table. As long as your global IDs were enabled, pasting that data will create the relationship.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 20:39:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/is-there-an-easy-way-to-populate-a-new-related/m-p/1344141#M74693</guid>
      <dc:creator>MDB_GIS</dc:creator>
      <dc:date>2023-10-31T20:39:19Z</dc:date>
    </item>
  </channel>
</rss>

