<?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: Loop over each features of a layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006692#M70978</link>
    <description>&lt;P&gt;Thanks for replying&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;. I am not that familiar with Query, but I will try if that works or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 18:22:25 GMT</pubDate>
    <dc:creator>RabinSubedi</dc:creator>
    <dc:date>2020-12-03T18:22:25Z</dc:date>
    <item>
      <title>Loop over each features of a layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006683#M70975</link>
      <description>&lt;P&gt;Hello ArcGIS Community!&lt;/P&gt;&lt;P&gt;I am new to ArcGIS API for javascript. I need to run a loop over each feature of this layer to calculate the sum of attribute "Length_Cal" and display features until the sum is less than 100. All remaining features should be hidden. The loop should run based on the attribute "PCR_NBR" in ascending order. Here is my layer:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;pavement&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://services.arcgis.com/oAgh7hBEBlHvOJJb/arcgis/rest/services/PavementCondition/FeatureServer" target="_blank"&gt;https://services.arcgis.com/oAgh7hBEBlHvOJJb/arcgis/rest/services/PavementCondition/FeatureServer&lt;/A&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Apologies in advance if I am asking/don't know a simple thing.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 17:57:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006683#M70975</guid>
      <dc:creator>RabinSubedi</dc:creator>
      <dc:date>2020-12-03T17:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loop over each features of a layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006691#M70977</link>
      <description>&lt;P&gt;If I'm understanding your intention correctly, you could query all the features (something like 1=1) then loop through the features in the FeatureSet to display only the ones you want. &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query/index.html" target="_self"&gt;Here's a sample you could start with.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 18:19:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006691#M70977</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2020-12-03T18:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loop over each features of a layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006692#M70978</link>
      <description>&lt;P&gt;Thanks for replying&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/191789"&gt;@BlakeTerhune&lt;/a&gt;. I am not that familiar with Query, but I will try if that works or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 18:22:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loop-over-each-features-of-a-layer/m-p/1006692#M70978</guid>
      <dc:creator>RabinSubedi</dc:creator>
      <dc:date>2020-12-03T18:22:25Z</dc:date>
    </item>
  </channel>
</rss>

