<?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 How to pass child record response from one child to the next, but to allow for edits? in Attribute Rules Questions</title>
    <link>https://community.esri.com/t5/attribute-rules-questions/how-to-pass-child-record-response-from-one-child/m-p/1371018#M1256</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NickAddison_2-1705506678364.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91819i0E4AB40920571F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NickAddison_2-1705506678364.png" alt="NickAddison_2-1705506678364.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached workflow is what I'm trying to achieve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I have it structured to pass the child-to-child and child-to-parent using the script below as a calculation constraint.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var relatedRecords = OrderBy(
    FeatureSetByRelationshipName($feature, "Hydrant_Data_Maintenance_Records_Relationship"), "Last_Maintenance_Date DES");
var relatedInfo = "";
if (Count(relatedRecords) &amp;gt; 0) {
    var latestRecord = First(relatedRecords);
    var conditionUpperBarrel = latestRecord.Condition_Upper_Barrel;
    
    // Check if the conditionUpperBarrel is not null or empty before assigning
    if (conditionUpperBarrel != null &amp;amp;&amp;amp; conditionUpperBarrel != "") {
        relatedInfo = conditionUpperBarrel;
    }
}

return relatedInfo;&lt;/LI-CODE&gt;&lt;P&gt;This works in terms of passing the records from one to another, however, because it is a calculation, it doesn't allow for updates/edits to the child responses to indicate the change in condition status in response to the maintenance work performed. Am I thinking about this wrong? Should the child-to-child record passing, that is then editable, not be done via a calculation constraint?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2024 15:52:19 GMT</pubDate>
    <dc:creator>NickAddison</dc:creator>
    <dc:date>2024-01-17T15:52:19Z</dc:date>
    <item>
      <title>How to pass child record response from one child to the next, but to allow for edits?</title>
      <link>https://community.esri.com/t5/attribute-rules-questions/how-to-pass-child-record-response-from-one-child/m-p/1371018#M1256</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NickAddison_2-1705506678364.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91819i0E4AB40920571F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NickAddison_2-1705506678364.png" alt="NickAddison_2-1705506678364.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached workflow is what I'm trying to achieve.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I have it structured to pass the child-to-child and child-to-parent using the script below as a calculation constraint.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var relatedRecords = OrderBy(
    FeatureSetByRelationshipName($feature, "Hydrant_Data_Maintenance_Records_Relationship"), "Last_Maintenance_Date DES");
var relatedInfo = "";
if (Count(relatedRecords) &amp;gt; 0) {
    var latestRecord = First(relatedRecords);
    var conditionUpperBarrel = latestRecord.Condition_Upper_Barrel;
    
    // Check if the conditionUpperBarrel is not null or empty before assigning
    if (conditionUpperBarrel != null &amp;amp;&amp;amp; conditionUpperBarrel != "") {
        relatedInfo = conditionUpperBarrel;
    }
}

return relatedInfo;&lt;/LI-CODE&gt;&lt;P&gt;This works in terms of passing the records from one to another, however, because it is a calculation, it doesn't allow for updates/edits to the child responses to indicate the change in condition status in response to the maintenance work performed. Am I thinking about this wrong? Should the child-to-child record passing, that is then editable, not be done via a calculation constraint?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any assistance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 15:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/attribute-rules-questions/how-to-pass-child-record-response-from-one-child/m-p/1371018#M1256</guid>
      <dc:creator>NickAddison</dc:creator>
      <dc:date>2024-01-17T15:52:19Z</dc:date>
    </item>
  </channel>
</rss>

