cancel
Showing results for 
Search instead for 
Did you mean: 

While Loop Action Block break never triggers

Former Member
0 Kudos

Hi all,

This has to be something stupid, but here goes.

I have a local property that is an Integer, huCount.

1. Assignment block sets Local.huCount to

Transaction.numHUs{/Rowsets/Rowset/Row bracket pound Each_HU_Qty.CurrentItem pound bracket /Item}

(Sorry about that bracket and pound, but it won't display right on the forum...)

I tried number(...) and tried a constant 3 too.

Trace show value of 3 at this point

2. While block has break ---> Local.huCount <= 0

3. The action block after the While Loop is a trace to show the value of huCount

4. The action block after that is an assignment Local.huCount <--- Local.huCount - 1

The trace #3 shows: 3 2 1 0 -1 -2 .... -254

What am I doing wrong?

Thanks,

--Amy Smith

--Haworth

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I think you need to set the break in an assignment action thats in the loop.

Former Member
0 Kudos

Hi Chrisitan,

I think I DID do that.

2. While block has break ---> Local.huCount <= 0

3. On the branch under the while loop: The action block after the While Loop is a trace to show the value of huCount

4. On the branch under the while loop: The action block after that is an assignment Local.huCount <--- Local.huCount - 1

Unless you mean I need a local boolean property, check that in the while action and set that in the branch. Meaning that you can't put a condition like Local.huCount > 0 in the Break of the while loop. Is that how it works?

Thanks for your help!

--Amy

--Haworth

Former Member
0 Kudos

While Loop Action o Assignment Action with "While Loop Action.break ---> Local.huCount <= 0"

Former Member
0 Kudos

Thanks! Boy I really didn't get it and the manual was no help. Thanks again.

--Amy Smith

--Haworth

Answers (0)