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
Problem with CONCAT of repeating OBX field to single field
Gordon Koch
I am trying to concat multiple OBX.5 fields into a single OBX.5 with the following:
Source:
~1(0).1(0).5(0).0(0).OBX(0).#5(0)
1(0).1(0).5(0).0(0).OBX(%s1).#5(0)
Destination:
1(0).1(0).5(0).0(0).OBX(0).#5(0)
However the data in the first OBX.5 field repeats twice in my output and and I still get an undesired second iteration of the OBX segment. This setup works for me with NTE.3 in a different Xlate, so I do not know why it is not working here. Any suggestions?
Thank You.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Gary Atkinson
use your field iteration in the segment iteration.
System
Originally posted by Ryan Spires
Couple things to check...
Make sure you are doing the logic inside the iteration for the OBX segment.
(I am assuming you are wrapping multiple OBX's into a single OBX)
Make sure you are using the concat
If you are doing a bulk or path copy of the OBX Seg, you may need (before the concat) do a pathcopy of
@null
to 1(0).1(0).5(0).0(0).OBX(%s1)
To wipe out the contents that would otherwise be mapped... (this would be done inside your Segment iterate as well.
When you do that you will need to map the other fields you want in the OBX field by field or those will get wiped out as well.
Gordon Koch
Thanks guys for your input. I added the
@null
action prior to my CONCAT, and now the data in the first OBX.5 field no longer repeats in my output. However I still get a "blank" OBX segment (nothing in OBX.5) for each of the subsequent iterates. Gary, I am not sure what you mean by using the field iteration in the segment iteration. Getting closer...
Thanks
System
Originally posted by Ryan Spires
Are you wanting to eliminate the subsequent OBX's alltogether...
If so, it sounds like you are doing a bulkcopy, or a pathcopy within the segment iterate...
If you have a pathcopy using the iteration variables of the segment, you could remove it...
if you are doing a bulk copy, then you can use the pathcopy using source of
@null
and destination of the OBX segment within the iterate (and use your iteration variable) it will null all subsequent OBX segs being sent outbound.
Ryan
System
Originally posted by Gary Atkinson
I thought you wanted to take multiple OBX:5 fields into multiple OBX segments.
Gordon Koch
Thanks Ryan. It was the PATHCOPY giving me the unwanted OBX segments. One more mystery...
I need to hardcode something within the CONCAT'ed OBX.5 field. I just added =WORD to the top row of my source, and now this hardcoded word repeats twice at the beginning. Any thoughts as to why it is looping...
Thanks.
System
Originally posted by Ryan Spires
are you adding that before the segment iterate or within it?
If you want at the top, I suspect you would want to add before the iterate.
Gordon Koch
Hello Ryan,
I have it at the top within the CONCAT action:
Source
=Transfusion Reaction Extended Work-up
~1(0).1(0).5(0).0(0).OBX(0).#5(0)
1(0).1(0).5(0).0(0).OBX(%s1).#5(0)
I get this output:
1(0).1(0).5(0).0(0).OBX(0) : >|||||Transfusion Reaction Extended Work-up~Transfusion Reaction Extended Work-up~~Non-hemolytic Allergic Transfusion Reaction~No Bacterial Contamination noted after 7 days<
Again, the removing the PATHCOPY got rid of the extra segment and everything was fine until I needed to hardcode the comment at the beginning.
Thanks
System
Originally posted by Ryan Spires
if the hardcoding is in the iterate with the concat action, it will put the hardcoding into the data with each iteration.
move your hardcoding our into its own copy command above the iterate.
Inside the iterate when you use the
concat
~1(0).1(0).5(0).0(0).OBX(0).#5(0)
1(0).1(0).5(0).0(0).OBX(%s1).#5(0)
it will pull what you have hardcoded. the first time but not each subsequent time.
Gordon Koch
Got it. That makes sense about the hardcoding repeating with each iterate. I will make the change later. Thanks Ryan for all your help...