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
Repeating PR1 segments copied into DG1 segments issue
System
Originally posted by Jill Marcotte
Any help is appreciated for the following issue:
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Jill,
I don't think you need to count up the PR1 group.
Based on your description and without the attachments which I don't see, here is what I would do:
Will need to manage our own counter for the appending of PR1 to DG1 - let's say %s99. So at the beginning of the Xlate initialize %s99 to 0 (zero).
ITERATE the DG1 segments Copying whatever is needed. Inside that ITERATE COPY the counter from the ITERATE (let's say %s1) to our counter %s99.
At the end of the ITERATE the %s99 counter has the value of the last repetition of the DG1.
ITERATE over the PR1 group using %g1. First Action in the ITERATE do an IF Action - IF the %s99 is greater than 0 (use the IF action for this) then add 1 to %s99 (use the MATH Action with the ADD function for this). After the IF %s99 now points to the next DG1 segment to be created.
Now COPY (not PATHCOPY, COPY) each field from the PR1 (referenced by %g1) needed to go to the DG1 using %s99 for the DG1 reference.
You don't need to worry about if there are no PR1 segments because the ITERATE won't activate so no harm done.
The IF for greater than zero should take care of the situation where there are no inbound DG1 segments so that your PR1 information begins with the first repetition of DG1.
This may need some tweaking but I think the above approach will work - this can be done in the Xlate using only Xlate Actions if I understand the challenge correctly.
System
Originally posted by Jill Marcotte
Jim K. helped me to understand what I needed to do to correct the variables within Cloverleaf for my issue.
The purpose of this translation was to copy the PR1 and DRG segments into DG1 segments, then associate the ZD2 3 Present on Admission indicator with the appropriate DG1 segment. Since I