<?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: Help with Arcade For Loops and editing related features in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-for-loops-and-editing-related/m-p/1059352#M41078</link>
    <description>&lt;P&gt;Solved! For anyone who may stumble upon this post, my error was in that I was trying to modify related geometry (shape field) by using the field name 'geometry' instead of 'shape'. Made the change and it works perfectly!&lt;/P&gt;</description>
    <pubDate>Wed, 19 May 2021 11:29:43 GMT</pubDate>
    <dc:creator>ajevans429</dc:creator>
    <dc:date>2021-05-19T11:29:43Z</dc:date>
    <item>
      <title>Help with Arcade For Loops and editing related features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-for-loops-and-editing-related/m-p/1059122#M41057</link>
      <description>&lt;P&gt;I'm super new to using for loops in arcade, and I'm trying to construct an Attribute Expression on the shape field which triggers an update to the geometry of all related records, triggered by an update to the parent feature. Related (child) fc is called 'gistree.gisowner.Forestry_Tree_Work'.&lt;/P&gt;&lt;P&gt;After making this active, I get an error when trying to submit an update to a parent feature with related records. If the parent feature does not have any related records (count is 0), then it submits fine, as it should.&lt;/P&gt;&lt;P&gt;Could anyone help me out with my error?&lt;/P&gt;&lt;P&gt;var fstreework = FeatureSetByName($datastore, 'gistree.gisowner.Forestry_Tree_Work')&lt;BR /&gt;var treeglobalid = $feature.globalid&lt;BR /&gt;var sql = "relglobalid = '" + treeglobalid + "'"&lt;BR /&gt;var fsListRelated = Filter(fstreework, sql)&lt;BR /&gt;var WorkList = []&lt;BR /&gt;var counter = 0&lt;BR /&gt;var noWork = Count(fsListRelated)&lt;BR /&gt;if (noWork &amp;gt; 0) {&lt;BR /&gt;for (var work in fsListRelated) {&lt;BR /&gt;WorkList[counter] = {&lt;BR /&gt;'globalid': work.globalid,&lt;BR /&gt;'attributes': {&lt;BR /&gt;'geometry': Geometry($feature)&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;counter++&lt;BR /&gt;}&lt;BR /&gt;return {&lt;BR /&gt;'result': Geometry($feature),&lt;BR /&gt;'edit': [{&lt;BR /&gt;'className': 'gistree.gisowner.Forestry_Tree_Work',&lt;BR /&gt;'updates': WorkList&lt;BR /&gt;}]&lt;BR /&gt;}&lt;BR /&gt;} else {&lt;BR /&gt;return Geometry($feature)&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 19:27:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-for-loops-and-editing-related/m-p/1059122#M41057</guid>
      <dc:creator>ajevans429</dc:creator>
      <dc:date>2021-05-18T19:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Arcade For Loops and editing related features</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-for-loops-and-editing-related/m-p/1059352#M41078</link>
      <description>&lt;P&gt;Solved! For anyone who may stumble upon this post, my error was in that I was trying to modify related geometry (shape field) by using the field name 'geometry' instead of 'shape'. Made the change and it works perfectly!&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 11:29:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/help-with-arcade-for-loops-and-editing-related/m-p/1059352#M41078</guid>
      <dc:creator>ajevans429</dc:creator>
      <dc:date>2021-05-19T11:29:43Z</dc:date>
    </item>
  </channel>
</rss>

