How to create a loop that starts from no. 1 and go up

Hi I just started learning KNIME and I am having a really difficult time to create a workflow for loop.

I’m trying to create a loop to prioritize specific data I’ve numbered the Item and date and what I want to do is

Take item no.1, date no.1 and minus the required Qty from the stock, take the remaining stock and repeat with the no.2 until stock turns 0.

I don’t know how to make the loop and make it choose 1 and go up from there on.

Would really appreciate if you could help. Thank you.

Hi @gewqgewq , and welcome to the KNIME community,

Do you have some sample data (with anything sensitive removed) perhaps in a spreadsheet, showing the data you have and your expected results. This will make it easier for somebody to help with suggestions.
thanks :slight_smile:

1 Like

If I understand correctly, you have a sorted list of required items and you want to see how many of those fit into the stock you have. I think you do not necessarily need a loop. You can use a Moving Aggregator with the cumulative option to sum up your required quantities cumulatively. Then you can check up to which point the cumulative sum is lower than your stock, e.g using a Rule Engine node. If that is not what you need, I agree with @takbb that we need more info.
Kind regards,


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.