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
Concating an Iterate
Kevin Crist
I am trying to concat all the OBX.5.1 fields into the OBR.31 field. I am only getting the last OBX field to go into this field. I cant tell if my iterate is wrong or if it is overwriting therefore ending up with the last one.
These are the OBX examples:
|1|CE|RAD1^TRANSPORT MODE|1|CART^
TRANSPORT MODE,CART
<
|2|CE|RAD5^OTH RAD EXAMS TODAY|1|Y^
OTH RAD EXAMS TODAY,YES
<
|3|ST|REA8^REASON FOR EXAM|1|not really^
REASON FOR EXAM,not really<
I want them to look like this in the OBR.31 field:
CART^TRANSPORT MODE,CART::OTH RAD EXAMS TODAY,YES::REASON FOR EXAM,not really<
I have attached my iterate and xlate.
Thanks for any help or advice.
Find more posts tagged with
Clovertech
Comments
Rob Abbott
it looks like you need the destination field as a source in every CONCAT. Looking at the screenshots I only see it in the last one.
It might be easier to read if you to build up a temp variable inside the iterate and COPY that to the destination after the iterate.
Russ Ross
I noticed on some of your concat statments the destination field has a %g in the path and that might be what is part of your delima.
Another approach to help reduce pathing issues is to concat everyhting to a temproary varibale and once everything is concatendated as desired then copy the contents of the temporary variable to the desired destination field.
Also, as Rob pointed out the temporary variable will be the first input item to the concat statment as well as the output of the concat statment.
Kevin Crist
Thanks for the replies but i think i am confusing myself.
Below is what the original OBX looks like. I need to concat the OBX.3.1 field (which is the question) to the OBX.5.1 field (which is the answer field), except for if the OBX.3.1 is REASON FOR EXAM then i concat that to the OBX.3.0 field. So the example in my previous post is after this is done, which works ok until i try to add them all to the same field.
OBX|1|CE|RAD1^TRANSPORT MODE|1|CART^CART
OBX|2|CE|RAD5^OTH RAD EXAMS TODAY|1|Y^YES
OBX|3|ST|REA8^REASON FOR EXAM|1|not really
If my iteration is off where does that need to be?
System
Originally posted by Henry Tabingo
Is your last concat statement within the iterate?
System
Originally posted by Henry Tabingo
Hi Kevin,
If you haven't already resolved your xlate, you may also need to place the repeating variable in your destination path in that last concat. The OBR field will then have a repeating tilde "~" that separates each value:
CONCAT {~2(0).1(0).OBX.00573(0).[1]}=::->2(0).0(0).OBR.00263(%g1)
Henry
Kevin Crist
OK, i am having quite a time with this. i have changed to try and use more variables and am running into an issue. When i try to concat all of the OBX.5.1 fields into 1 variable i think they are overwriting each other but not real sure. Any ideas?
Russ Ross
I never did completely understand exactly what you wanted to accomplish but still not seeing that your output temp variable is the first input to the CONCAT statement.
For example using your CONCAT for
@Prompts
in your screen shot I'm thinking might look something like this:
@Prompts
{2(0).1(0).1(0).0(%g1).OBX.00571.[1]} =, {2(0).1(0).1(0).0(%g1).OBX.00573.[1]} ->
@Prompts
Of course don't forget to initilize
@Prompts
to
@null
before you start using it inside your iterates.