infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Leaving an Iterate???
System
Originally posted by Corey Lewis
So I have an Iterate over a DSP segment on a result. What I want to do is leave the Iterate if I hit a DSP segment that has a certain value in DSP:3. Is that possible?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Corey,
Not exactly.
What I would do is initialze a temp variable to zero before the ITERATE.
Then inside the ITERATE I would check for the temp variable to be qual to =0. If that is true then inside that If I would have another IF checking to see if the DSP conditin is true. If the DSP condition is true then I would set the temp variable to =1 else I would do whatever is needed inside the ITERATE.
So the ITERATE continues but only does meaningful work until the first time the DSP condition is true. Once the condition is true the ITERATE continues but because of the logic nothing else gets done.
System
Originally posted by Corey Lewis
Thanks Jim.
RobertKersemakers
I would do it (and I think I have done it) the way Jim describes. But I was wondering what would happen if you assign a ridiculously large number to the iteration variable as soon as the DSP condition is true. Not sure what variable you use, so I assume %s1, so something like
COPY =99999 -> $%s1
It should leave the iteration as well. Maybe worth trying (no time to try it myself atm).
Jim Kosloskey
Robert,
I suspect that would work - after all it is a method we use with List ITERATES to control looping but I would never be confident that no matter how high a number I set the input might one time be greater - then I would have a real trouble-shooting issue.
I think the way I described, while more work, is the most bullet proof.
Of course it would be nice to have a break function inside the ITERATE (that has been requested in the past).