<?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: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1418037#M1423</link>
    <description>&lt;P&gt;From what I've been reading (and trying to understand..) this isn't too unusual of a problem.&amp;nbsp; It doesn't stem from the dataset.&amp;nbsp; I've seen it corrected by changing up the attribute rule script:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/the-evaluation-of-attribute-rule-is-cyclic-or/td-p/1310661" target="_blank" rel="noopener"&gt;Something like this example.&lt;/A&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the examples of it being corrected are more complicated than mine so I'm not exactly sure how to apply a fix to my situation.&amp;nbsp; The key part for me is the understanding of it which hurts my head sometimes!&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2024 12:46:28 GMT</pubDate>
    <dc:creator>ChristopherBowering</dc:creator>
    <dc:date>2024-05-02T12:46:28Z</dc:date>
    <item>
      <title>When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414412#M1396</link>
      <description>&lt;P&gt;I have an attribute rule that runs on a field within a point feature class.&amp;nbsp; The value of said field is passed to a desired related table field when said parent field is populated or updated.&amp;nbsp; There is a 1:M relationship class using the GlobalID of the feature class and GUID of the table.&amp;nbsp; As it stands, only the FIRST table record receives the updated value if there are multiple records associated with a single feature.&amp;nbsp; This is due to the Arcade code using the 'First' FeatureSet function.&amp;nbsp; I borrowed and adjusted this code to get me this far but I don't know how to further adjust it so ALL related records receive the same update from the parent field.&amp;nbsp; Any help would be great!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if($originalfeature.Size == $feature.Size) { return }

var TEST = First(FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL"))
if(TEST == null) { return }

return {
  "edit": [
    {
      "className": "OCGIS.DPW_TESTING_Table",
      "updates": [
        {"globalID": TEST.globalid, "attributes": {"Size": $feature.Size}}
      ]
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 20:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414412#M1396</guid>
      <dc:creator>ChristopherBowering</dc:creator>
      <dc:date>2024-04-23T20:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414618#M1397</link>
      <description>&lt;P&gt;Just need to loop over the FeatureSet and build a list of return values&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;if ($originalfeature.Size == $feature.Size) {
    return
}

var fs = FeatureSetByRelationshipName($feature, "OCGIS.DPW_TESTING_REL");

var updates = [];
for (var feat in fs) {
    Push(updates, {
        "globalID": feat.globalid,
        "attributes": {
            "Size": $feature.Size
        }
    });
}

return {
    "edit": [
        {
            "className": "OCGIS.DPW_TESTING_Table",
            "updates": updates
        }
    ]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 24 Apr 2024 11:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414618#M1397</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2024-04-24T11:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414683#M1399</link>
      <description>&lt;P&gt;Hi there&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/188597"&gt;@MikeMillerGIS&lt;/a&gt;&amp;nbsp;.&amp;nbsp; That did the trick!&amp;nbsp; THANK YOU!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 13:12:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1414683#M1399</guid>
      <dc:creator>ChristopherBowering</dc:creator>
      <dc:date>2024-04-24T13:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1417788#M1419</link>
      <description>&lt;P&gt;Hi again &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/188597"&gt;@MikeMillerGIS&lt;/a&gt;&amp;nbsp;.&amp;nbsp; I am running into an infinite loop issue ("the evaluation of attribute rules is cyclic or exceeds maximum cascading level.") when using the above rule in conjunction with another rule you helped me out with.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/attribute-rules-questions/when-multiple-child-records-exist-how-to-carry/m-p/1415418#M1417" target="_blank" rel="noopener"&gt;When Multiple Child Records Exist, How to Carry Over Field Value of MOST RECENT Record to Parent Field&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I disable the rule which carries over children values to parent fields (set on child table), this initial update all related records rule (set on parent fc) works fine.&amp;nbsp; When they're both enabled though, the initial rule throws the error when I update the parent field.&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp;The two rules do not deal with any of the same fields.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know how the rule within this thread could be adjusted to prevent the looping/error situation?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 01 May 2024 20:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1417788#M1419</guid>
      <dc:creator>ChristopherBowering</dc:creator>
      <dc:date>2024-05-01T20:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1417883#M1422</link>
      <description>I am not sure, hard to troubleshoot with a dataset to see what is going on.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 May 2024 00:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1417883#M1422</guid>
      <dc:creator>MikeMillerGIS</dc:creator>
      <dc:date>2024-05-02T00:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: When Updating Child Table Fields from Parent FC Fields, How to Update ALL Related Records</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1418037#M1423</link>
      <description>&lt;P&gt;From what I've been reading (and trying to understand..) this isn't too unusual of a problem.&amp;nbsp; It doesn't stem from the dataset.&amp;nbsp; I've seen it corrected by changing up the attribute rule script:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/the-evaluation-of-attribute-rule-is-cyclic-or/td-p/1310661" target="_blank" rel="noopener"&gt;Something like this example.&lt;/A&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the examples of it being corrected are more complicated than mine so I'm not exactly sure how to apply a fix to my situation.&amp;nbsp; The key part for me is the understanding of it which hurts my head sometimes!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2024 12:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/when-updating-child-table-fields-from-parent-fc/m-p/1418037#M1423</guid>
      <dc:creator>ChristopherBowering</dc:creator>
      <dc:date>2024-05-02T12:46:28Z</dc:date>
    </item>
  </channel>
</rss>

