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
Keeping the & in OBX.5 while losing the ~
Gordon Koch
Hello All,
I have a problem where I am successfully removing the "~" from OBX.5, but the Xlate is also removing the & when present. Of course the & is being read as the sub field delimiter, but I want it present, or to convert it to "AND" since this the intent in the lab result. The CONCAT line is as follows:
Source: ~1(0).1(0).1(%g1).OBX.00573(0)
1(0).2(0).1(%g1).OBX(0).00573(%f1)
Destination: 1(0).1(0).1(%g1).OBX.00573(0)
I understand the the engine is doing exactly what is being coded, but how do I keep the ampersands?
When I add the following tcl fragment to the Pre Proc, nothing gets translated.
set result [lindex $xlateInVals 0]
regsub -all {&} $result {AND} noamp
set xlateOutVals $noamp
I do not know if this can be done by Xlate only, or I need to fix my tcl to work with this setup. Any help would be appreciated...
Thank You
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Daniel Lee
I don't know if you can change the delimiters in the xlate. From what I can see of your code, your xlate isn't actually removing the '~'. It's combining repeating fields into one field therefore eliminating the need for the '~' in your outbound message. I know the result is the same, but the big difference is that I don't think you have access to manipulate the delimiters within the xlate.
You could probably do something similar with the &'s to what you're doing with the '~' and iterate over the subfields and combine them into one field. If it were me, I'd prefer to do it in a tclproc before it gets to your xlate.
Vince Angulo
I'm not sure if the xlate is the right place to work on delimiters either -- maybe if you PATHCOPY the entire segment into a temp variable then try and remove them?
But a pre-xlate proc is probably the cleaner solution - that's what we do here.
Good luck!
System
Originally posted by Gene Salay
Would this work as a tcl frag?
set resulta [lindex $xlateInVals 0]
set resultb [lindex $xlateInVals 1]
if {[string length $resultb]} {
set resultb AND$resultb
}
set xlateOutVals
If the inbound value contains an &, it's treated as two fields, and xlateInVals 1 has content, so you replace the inbound & with an AND.
Gordon Koch
Thanks to everyone for your replies. With this information and other help, I realize that this needs to be done outside of the Xlate and in a pre proc at the route position.