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
Iterate - lists
Keith McLeod
Can a variable be used as the basis for a list iterate? I have a need to create repeating segments from the result of a SQL query. Other suggestions are welcome.
I am making the assumption that the literation over a list gives you the index number of each element. If I have 3 elements, the %l1 variable would take on the values 0, 1, and 2. 5 elements 0, 1, 2, 3, and 4. Where the return of results may produce a variable length list, this is what lead me to the question of the basis being a variable.....
Any thoughts are welcome including other creative alternatives....
Find more posts tagged with
Clovertech
Comments
jcobane1
Keith,
You can treat/manipulate/reference the list iteration variable (%l1) the same as you do the group,segment,field iteration variables.
RobertKersemakers
Keith,
Have a look at this thread
https://usspvlclovertch2.infor.com/viewtopic.php?t=2213
with an example of a DO-WHILE loop. I think this is what you are looking for.
You can't use a variable as a basis for an Iteration, so you can't iterate over a dynamic basis.
Jim Kosloskey
The ability to use a variable as the list basis has been requested as an enhancement some time ago.
Maybe we can get this in Cloverleaf 6.0???
System
Originally posted by Robert Milfajt
Talk about freakish timing. I just needed to do this today, and here it is on Clovertech.
Robert, awsome soluton!!
Bob