on 03-17-2008 11:03 PM
Hi,
XMII Version: 11.5
I am trying to break out of a reapeater loop in a BLS Transaction when a condition is met. This works fine if the condition is initially true but does not seem to work if the condition starts out false and turns true after a few repetitions of the repeater loop. Instead, it loops until the maxIterations is met and then breaks out.
Below is the condition I am using in the break link of the repeater loop.
if( (stringindexof( Local.strTempParam1 , "<THOUSANDITEMTAG>" ) == 0), true, false)
I've used a trace block right below the repeater loop with the same condition and have watched it change from false to true, and the repeater loop continues to repeat. I put an if block right below the repeater with the same logic and that keeps the transaction from repeating when it shouldn't, but this seems inefficient.
Is there any way to actually make it break out when it is supposed to?
Thanks alot for any help or clarifications.
Kerby
Simply set the value of the boolean "Break" property on the repeater action to "true" to interrupt the processing of the repeater loop.
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Rick, that solved my problem
To expand on this a little, I had to set the break property of the while loop to "true" in a different action block than the loop itself. When I was trying to set the break to true inside the while block via a if statement, it did not take effect. It seemed like the initial break condition of the block was only evaluated the first time the while block was entered and not on each subsequent loop.
Paol,
Setting the currentItem to maxIterations or greater than maxIterations also did not seem to work. This was something else I had tried early on.
I guess I just missed the obvious way to break out after I couldn't get the break condition to work in the loop itself.
Thanks.
Kerby
Hi.
I am not sure, but as I remember, you are able to set the loop parameter, i.e. the count parameter on the loop action to the max value and thereby abort the repeater.
BR.
Poul.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.