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
How to remove unwanted Pipes at the end of a segment
System
Originally posted by Brian Craig
I am working on a tcl proc to replace OBX's with NTE's I cannot figure out how to remove the unwanted pipes at the end of the segment. Has anyone successfully removed unwanted pipes?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Are the pipes a result of an Xlate?
If so, then one way is to change the outbound variant so that any fields past the last one actually populated are not required.
If the Xlate sees any required fields it will add all of the intervening field separators as the field has to exist.
So say a segment with 3 fields:
Field_1 required
Field_2 optional
Field_3 required
If only Field_1 is populated by the Xlate (say with 'stuff' as the value) then the output would be:
SEG|stuff||
if the definition is changed to this:
Field_1 required
Field_2 optional
Field_3 optional
then the result would be:
SEG|stuff
Of course you could always write some tcl to be executed post Xlate but why?
Max Drown
I agree with Jim. Run the message through an Xlate which will remove all trailing delimiters.
System
Originally posted by Michael Hertel
And if it is not due to Xlate
set seg [string trimright $seg $fsep]
or
set seg [string trimright $seg |]