Hello ArcGIS Community!
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:
Apologies in advance if I am asking/don't know a simple thing.
Thanks!
Thanks for replying @BlakeTerhune. I am not that familiar with Query, but I will try if that works or not.
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. Here's a sample you could start with.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.