<?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 Attribute rule with Update trigger on Same feature class in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-with-update-trigger-on-same-feature/m-p/1290019#M69265</link>
    <description>&lt;P&gt;I am trying to create an attribute rule on update where if user updates any particular attribute field then within subnetwork for all devices it should update same attribute field with same value. Written below arcade expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($editContext.editType == "UPDATE") {&lt;BR /&gt;//we are updating the row, in this table, we need to update details for other too in the table&lt;BR /&gt;var id = $feature.subnetworkname;&lt;BR /&gt;var gid = $feature.globalid;&lt;BR /&gt;var fs = FeatureSetByName($datastore, "ElectricDistributionDevice");&lt;BR /&gt;var selectedFeats = Filter(fs, "subnetworkname = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354972"&gt;@ID&lt;/a&gt; And globalid &amp;lt;&amp;gt; @gid");&lt;BR /&gt;var destinationRow = Count(selectedFeats);&lt;BR /&gt;if (destinationRow == 0) return; //the row exists, time to break the loop (additional logic here can be used to update if they are diffrent )&lt;BR /&gt;//the row isn't in the other table, lets add it.&lt;BR /&gt;else {&lt;BR /&gt;for (var f in selectedFeats){&lt;BR /&gt;return {&lt;BR /&gt;"edit": [&lt;BR /&gt;{&lt;BR /&gt;"className": "ElectricDistributionDevice",&lt;BR /&gt;"updates": [{&lt;BR /&gt;"globalid":f.globalid,&lt;BR /&gt;"attributes": {&lt;BR /&gt;"comments": "Updated"&lt;BR /&gt;}&lt;BR /&gt;}]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this expression I am getting error with message, "The Evaluation of rule in cyclic or exceeds maximum cascading levels." Error image attached. I need help to resolve this error. Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikramAundhekar_0-1684320654012.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70913i0DE7333C3EA2493E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikramAundhekar_0-1684320654012.png" alt="VikramAundhekar_0-1684320654012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 10:55:24 GMT</pubDate>
    <dc:creator>VikramAundhekar</dc:creator>
    <dc:date>2023-05-17T10:55:24Z</dc:date>
    <item>
      <title>Attribute rule with Update trigger on Same feature class</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-with-update-trigger-on-same-feature/m-p/1290019#M69265</link>
      <description>&lt;P&gt;I am trying to create an attribute rule on update where if user updates any particular attribute field then within subnetwork for all devices it should update same attribute field with same value. Written below arcade expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ($editContext.editType == "UPDATE") {&lt;BR /&gt;//we are updating the row, in this table, we need to update details for other too in the table&lt;BR /&gt;var id = $feature.subnetworkname;&lt;BR /&gt;var gid = $feature.globalid;&lt;BR /&gt;var fs = FeatureSetByName($datastore, "ElectricDistributionDevice");&lt;BR /&gt;var selectedFeats = Filter(fs, "subnetworkname = &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/354972"&gt;@ID&lt;/a&gt; And globalid &amp;lt;&amp;gt; @gid");&lt;BR /&gt;var destinationRow = Count(selectedFeats);&lt;BR /&gt;if (destinationRow == 0) return; //the row exists, time to break the loop (additional logic here can be used to update if they are diffrent )&lt;BR /&gt;//the row isn't in the other table, lets add it.&lt;BR /&gt;else {&lt;BR /&gt;for (var f in selectedFeats){&lt;BR /&gt;return {&lt;BR /&gt;"edit": [&lt;BR /&gt;{&lt;BR /&gt;"className": "ElectricDistributionDevice",&lt;BR /&gt;"updates": [{&lt;BR /&gt;"globalid":f.globalid,&lt;BR /&gt;"attributes": {&lt;BR /&gt;"comments": "Updated"&lt;BR /&gt;}&lt;BR /&gt;}]&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this expression I am getting error with message, "The Evaluation of rule in cyclic or exceeds maximum cascading levels." Error image attached. I need help to resolve this error. Thank you.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikramAundhekar_0-1684320654012.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/70913i0DE7333C3EA2493E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikramAundhekar_0-1684320654012.png" alt="VikramAundhekar_0-1684320654012.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 10:55:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/attribute-rule-with-update-trigger-on-same-feature/m-p/1290019#M69265</guid>
      <dc:creator>VikramAundhekar</dc:creator>
      <dc:date>2023-05-17T10:55:24Z</dc:date>
    </item>
  </channel>
</rss>

