Expand my Community achievements bar.

Adding a number from a bundle until it is equal to a number

Avatar

Level 3

In WF Fusion, I need to add a number from a bundle until it gets to a certain point then stop. Say I have 4 bundles with 1,2,4,8 and I need to make the number equal to 7. How would I add each bundle one by one and move on to the next step when the combined value equals 7, aka only the first 3 bundles pass through while the last gets discarded

 

1st bundle

1 !>= 7

2nd bundle

1+2 !>= 7

3rd bundle

1+2+4 >= 7

Since equal or greater stop accepting bundles and move to next step

 

Here is a coding example

Lawson02_0-1718663093746.png

 

Output:

Lawson02_1-1718663093765.png

 

 

1 Reply

Avatar

Level 9

Hello,

 

to make it not too complicated, I would think about using a Set Variable module to make your calculation followed by a Router module, which uses a filter (e.g. variableName < 7).

 

Regards

Lars