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
Another Iter questions
System
Originally posted by Bob Schmid
I would like to start iterating starting with index one of a repeating field.
where/how should I init the $f1 variable field ?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Robert,
You cannot cause the ITERATION Action to begin at any specific point. However, for your case, inside the ITERATE you can modify the %f1 counter. I would rather modify my own counter (say %f2) and use that in the address path of the following Actions. That way you would always be able to tell where the ITERATION was as %f1 would have the real value of the iteration count.
You can reference and/or modify iteration counters by prefixing the counter with a $.
Such as a MATH ADD Action where you are trying to add 1 to %f2:
The Source column would have =1 and $%f2.
The Destination column would have $%f2.
You would then use %f2 anywhere appropriate in the Source and/or destination address paths.
Jim Kosloskey
System
Originally posted by Chris Williams
If you want to skip given iterations you could take the lines currently inside the iteration and surround them with an IF statement that is only true for those iterations you want to occur.
ITERATE
copy ...
copy ...
ETC
Would become
ITERATE
IF %f1 > 0
copy ...
copy ...
ETC
Jim Kosloskey
Chris,
A small but not insignificant change to your IF Action:
IF $%f1 <---- Note the $
So there you have a couple of ways to resolve your issue one where you just use your own counter and start it with one more than the iteration counter, and one where you utilize an IF Action to detect where in the iteration set you are.
Cloverleaf(R) seems to always provide more than one way to get the job done.
Jim Kosloskey
System
Originally posted by Chris Williams
Just wondering if you were paying attention.