Skip to main content
Question

Looping functionality


I am trying to use the looping functionality to calculate the cumulative sum of values to match a certain value (budget). Those that are less or equal to that value are saved out as output and those that don't match should go to the loop and be processed again till all the features are processed. Any idea to make it working. Thanks

2 replies

redgeographics
Celebrity
Forum|alt.badge.img+50

Maybe I'm misinterpreting you (if so, please do correct me), but you want to have features get out of the loop if their cumulative sum is less than or equal to the budget, and keep them looping (and adding to the cumulative sum) if they are over budget? That seems a logic error to me

 

On a general note: I'd recommend you un-publish your loopinput port to avoid accidentally making a connection to it on the main canvas.


  • Author
  • April 11, 2022
redgeographics wrote:

Maybe I'm misinterpreting you (if so, please do correct me), but you want to have features get out of the loop if their cumulative sum is less than or equal to the budget, and keep them looping (and adding to the cumulative sum) if they are over budget? That seems a logic error to me

 

On a general note: I'd recommend you un-publish your loopinput port to avoid accidentally making a connection to it on the main canvas.

Thanks for your reply redgeographics, appreciate it. I agree, I will unpublish the loopinput.

I want to have features get out of the loop of if their cumulative sum is less than or equal to the budget, this will give the 1st batch result for those features and then the process has to restart and for the remaining ones, the process has to select those whose cumulative is less than or equal to the budget and gives out the 2nd batch result and continues looping until there are no features to run the process.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings