<?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: Arcade expression problem in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcade-expression-problem/m-p/1151176#M6210</link>
    <description>&lt;P&gt;D,&lt;/P&gt;&lt;P&gt;Want to get a few bits of details. Is this being used for&amp;nbsp;Utility Network?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, have you run this in a console or do a simple error message to get a count of the contents?&lt;/P&gt;&lt;P&gt;I'm wondering if the counter is not advancing.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var contents = FeatureSetByAssociation($feature, 'connected')
// If there is no contents, exit the function
if (count(contents) == 0) {
    return null;
}
var updateList = [];
var counter = 0;
for (var content in contents) {
  updateList[counter++] = {'globalid': content.globalid,
    'attributes': {'topageno': frompageno}
    };
  }

return {
  'result': $feature.frompageno,
  'edit': [{
      'className': 'xxxxxx',
      'updates': updateList
    }]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~Jake&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 09:26:01 GMT</pubDate>
    <dc:creator>Jake_S</dc:creator>
    <dc:date>2022-03-07T09:26:01Z</dc:date>
    <item>
      <title>Arcade expression problem</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-expression-problem/m-p/1150112#M6205</link>
      <description>&lt;P&gt;Hi, I have a problem about using &lt;SPAN&gt;Arcade&lt;/SPAN&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;When I run this code, I get an error message&lt;/P&gt;&lt;P&gt;I don't know how to fix it.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var contents = FeatureSetByAssociation($feature, 'connected')
var updateList = []
var counter = 0
for (var content in contents) {
  updateList[counter] = {
    'globalid': content.globalid,
    'attributes': {
      'topageno': frompageno,
    },
  }

  counter++
}
return {
  'result': $feature.frompageno,
  'edit': [
    {
      'className': 'xxxxxx',
      'updates': updateList,
    },
  ],
}
&lt;/LI-CODE&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;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="D_CGIS_0-1646301320763.png" style="width: 745px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/35475i0A270016024CDE77/image-dimensions/745x95?v=v2" width="745" height="95" role="button" title="D_CGIS_0-1646301320763.png" alt="D_CGIS_0-1646301320763.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 10:41:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-expression-problem/m-p/1150112#M6205</guid>
      <dc:creator>D_CGIS</dc:creator>
      <dc:date>2022-03-03T10:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade expression problem</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-expression-problem/m-p/1151176#M6210</link>
      <description>&lt;P&gt;D,&lt;/P&gt;&lt;P&gt;Want to get a few bits of details. Is this being used for&amp;nbsp;Utility Network?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, have you run this in a console or do a simple error message to get a count of the contents?&lt;/P&gt;&lt;P&gt;I'm wondering if the counter is not advancing.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var contents = FeatureSetByAssociation($feature, 'connected')
// If there is no contents, exit the function
if (count(contents) == 0) {
    return null;
}
var updateList = [];
var counter = 0;
for (var content in contents) {
  updateList[counter++] = {'globalid': content.globalid,
    'attributes': {'topageno': frompageno}
    };
  }

return {
  'result': $feature.frompageno,
  'edit': [{
      'className': 'xxxxxx',
      'updates': updateList
    }]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~Jake&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 09:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-expression-problem/m-p/1151176#M6210</guid>
      <dc:creator>Jake_S</dc:creator>
      <dc:date>2022-03-07T09:26:01Z</dc:date>
    </item>
  </channel>
</rss>

