<?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 Automating Data Updates Between Related Tables in ArcGIS Pro in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/automating-data-updates-between-related-tables-in/m-p/1581746#M9492</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently working on a project in ArcGIS Pro and need some assistance with automating data updates between two related tables in my geodatabase. Here's the scenario:&lt;/P&gt;&lt;H3&gt;Scenario:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Table 1&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Contains several material fields (&lt;STRONG&gt;TYPE_A&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_B&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_C&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_D&lt;/STRONG&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Has a calculated Total field that sums up these material fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;I want changes in this Total field to trigger updates in &lt;STRONG&gt;Table&lt;/STRONG&gt; &lt;STRONG&gt;2&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Table 2&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Contains a &lt;STRONG&gt;Total_Available_Material&lt;/STRONG&gt; field.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;This field should reflect the same value as the Total field in Table 1, automatically updating whenever the Total in Table 1 changes [ Without Use Triggers in the table ( insert or update ) ]&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Objective:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Ensure that any changes in the material fields in &lt;STRONG&gt;Table 1&lt;/STRONG&gt; automatically update the &lt;STRONG&gt;Total_Available_Material&lt;/STRONG&gt; field in &lt;STRONG&gt;Table 2.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Maintain data consistency across both tables without manual intervention.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Steps I Have Taken:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Created a Relationship Class&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Established a relationship class between &lt;STRONG&gt;Table 1&lt;/STRONG&gt; and &lt;STRONG&gt;Table 2&lt;/STRONG&gt; using a common field (ID).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;The Relationship Class was Simple and one to one.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Set Up Attribute Rules&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 1&lt;/STRONG&gt;: Created an attribute rule to calculate the total of material fields and intended to update Table 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 2&lt;/STRONG&gt;: Created an attribute rule to update the Total_Available_Material field based on changes in Table 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Arcade Expression Used:&lt;/H3&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 1&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Calculate the total of material fields in Table 1&lt;/STRONG&gt;&lt;BR /&gt;var totalMaterial = $feature.TYPE_A + $feature.TYPE_B + $feature.TYPE_C + $feature.TYPE_D;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Store the total in the Total field of Table 1&lt;/STRONG&gt;&lt;BR /&gt;$feature.&lt;SPAN&gt;Total_Available_Material&lt;/SPAN&gt;== totalMaterial;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Retrieve the related records from Table 2 using the relationship class&lt;/STRONG&gt;&lt;BR /&gt;var related_records = FeatureSetByRelationshipName($feature, "RelationShipClass");&amp;nbsp;&lt;BR /&gt;var related_record = First(related_records);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Update the Total_Available_Material field in Table 2&lt;/STRONG&gt;&lt;BR /&gt;if (!IsEmpty(related_record)) {&lt;BR /&gt;related_record.Total_Available_Material = totalMaterial;&lt;BR /&gt;return totalMaterial;&lt;BR /&gt;} else {&lt;BR /&gt;return totalMaterial; // Return the total if no related record is found&lt;BR /&gt;}&lt;/P&gt;&lt;H3&gt;Issues Encountered:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;The attribute rule in Table 1 does not seem to trigger the update in Table 2 automatically.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Unsure of the best approach to ensure that updates in Table 1 are reflected in Table 2 without manual intervention.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Request for Help:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;How can I modify my approach or the Arcade expressions to achieve the desired automated updates between these two tables?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Any best practices or tips for setting up such dependencies between related tables in ArcGIS Pro?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*Notice&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If the scenario wasn't clear easily want to force attribute rule to work without using triggers [ update , insert ]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards, [JIMMY]&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2025 14:42:59 GMT</pubDate>
    <dc:creator>JEMOO-01</dc:creator>
    <dc:date>2025-02-04T14:42:59Z</dc:date>
    <item>
      <title>Automating Data Updates Between Related Tables in ArcGIS Pro</title>
      <link>https://community.esri.com/t5/geodatabase-questions/automating-data-updates-between-related-tables-in/m-p/1581746#M9492</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently working on a project in ArcGIS Pro and need some assistance with automating data updates between two related tables in my geodatabase. Here's the scenario:&lt;/P&gt;&lt;H3&gt;Scenario:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Table 1&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Contains several material fields (&lt;STRONG&gt;TYPE_A&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_B&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_C&lt;/STRONG&gt;, &lt;STRONG&gt;TYPE_D&lt;/STRONG&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Has a calculated Total field that sums up these material fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;I want changes in this Total field to trigger updates in &lt;STRONG&gt;Table&lt;/STRONG&gt; &lt;STRONG&gt;2&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Table 2&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Contains a &lt;STRONG&gt;Total_Available_Material&lt;/STRONG&gt; field.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;This field should reflect the same value as the Total field in Table 1, automatically updating whenever the Total in Table 1 changes [ Without Use Triggers in the table ( insert or update ) ]&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Objective:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Ensure that any changes in the material fields in &lt;STRONG&gt;Table 1&lt;/STRONG&gt; automatically update the &lt;STRONG&gt;Total_Available_Material&lt;/STRONG&gt; field in &lt;STRONG&gt;Table 2.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Maintain data consistency across both tables without manual intervention.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Steps I Have Taken:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Created a Relationship Class&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Established a relationship class between &lt;STRONG&gt;Table 1&lt;/STRONG&gt; and &lt;STRONG&gt;Table 2&lt;/STRONG&gt; using a common field (ID).&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;The Relationship Class was Simple and one to one.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;Set Up Attribute Rules&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 1&lt;/STRONG&gt;: Created an attribute rule to calculate the total of material fields and intended to update Table 2.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 2&lt;/STRONG&gt;: Created an attribute rule to update the Total_Available_Material field based on changes in Table 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;H3&gt;Arcade Expression Used:&lt;/H3&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;In Table 1&lt;/STRONG&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Calculate the total of material fields in Table 1&lt;/STRONG&gt;&lt;BR /&gt;var totalMaterial = $feature.TYPE_A + $feature.TYPE_B + $feature.TYPE_C + $feature.TYPE_D;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Store the total in the Total field of Table 1&lt;/STRONG&gt;&lt;BR /&gt;$feature.&lt;SPAN&gt;Total_Available_Material&lt;/SPAN&gt;== totalMaterial;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Retrieve the related records from Table 2 using the relationship class&lt;/STRONG&gt;&lt;BR /&gt;var related_records = FeatureSetByRelationshipName($feature, "RelationShipClass");&amp;nbsp;&lt;BR /&gt;var related_record = First(related_records);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;// Update the Total_Available_Material field in Table 2&lt;/STRONG&gt;&lt;BR /&gt;if (!IsEmpty(related_record)) {&lt;BR /&gt;related_record.Total_Available_Material = totalMaterial;&lt;BR /&gt;return totalMaterial;&lt;BR /&gt;} else {&lt;BR /&gt;return totalMaterial; // Return the total if no related record is found&lt;BR /&gt;}&lt;/P&gt;&lt;H3&gt;Issues Encountered:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;The attribute rule in Table 1 does not seem to trigger the update in Table 2 automatically.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Unsure of the best approach to ensure that updates in Table 1 are reflected in Table 2 without manual intervention.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Request for Help:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;How can I modify my approach or the Arcade expressions to achieve the desired automated updates between these two tables?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Any best practices or tips for setting up such dependencies between related tables in ArcGIS Pro?&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;*Notice&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If the scenario wasn't clear easily want to force attribute rule to work without using triggers [ update , insert ]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you in advance for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Best regards, [JIMMY]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 14:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/automating-data-updates-between-related-tables-in/m-p/1581746#M9492</guid>
      <dc:creator>JEMOO-01</dc:creator>
      <dc:date>2025-02-04T14:42:59Z</dc:date>
    </item>
  </channel>
</rss>

