How to distribute numbers from a table (Inventory) to another table (Customers)?

I built something that does work - although it might not be the most elegant way to do it. The principle is first to group every product into a loop and then loop over each individual order. The tricky part is to ‘remember’ the quantity that is still in store after assigning a volume to the first order.

I did that by -well- just storing it into a table. I am not sure if KNIME can ‘remember’ a value or loop it back. So I just stored it and read it back. The table gets initiated for each product group. If you have very large volumes it might not be practical - but it does work and you might improve it further.

Also I put in a check to compare if the assigned deliveries match the inventory.

kn_example_order_inventory.knwf (99.2 KB)

2 Likes