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
splitting a text report
Kevin Crist
How would it be possible to split a report text? Our dication system sends out a report and then when they do an addendum it sends out the report plus the addendum cause the recieving system to error.
For example:
OBX||||||blah blah blah blah blah
OBX||||||testing testing testing
OBX||||||blah blah blah blah blah
OBX||||||ADDENDUM:|
OBX||||||more report text
OBX||||||more report text
OBX||||||i need a vacation
So if there is an ADDENDUM i need to remove all OBX segments prior to it and keep only the ADDENDUM and below.
OBX||||||ADDENDUM:|
OBX||||||more report text
OBX||||||more report text
OBX||||||i need a vacation
Any help or ideas are appreciated.
Thanks.
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Gary Atkinson
Loop through all the OBX:5 for the string "ADDENDUM" and use OBX:5 as your iterate variable for the OBXgrp. If you find "ADDENDUM" then do your copy of the OBX. As long as all of the "stuff" you don't want is not in the obxs below "ADDENDUM" I believe this will work. 8)
Jim Kosloskey
Kevin,
IF you are using BULKCOPY, you will need to get rid of the already existing OBX segments above the ADDENDUM as well.
With the solution you will need to use your own managed iteration counter for the outbound.
Kevin Crist
i will use pathcopy. i try to stay away from bulkcopy. but i havent started an xlate or tcl with this yet as it was just brought to my attention this am so i am pondering my point of attack.
System
Originally posted by Gary Atkinson
don't use pathcopy, copy only over when you need to. As Jim pointed out and which i forgot to mention is that need to declare your own counter. BTW...Hi Jim long time...I am headed back to the cloverleaf world. Yea Me!
I could not take using the new engine they forced me to use so I packed my bags
Kevin Crist
I am not very familiar with how to use and setup a counter so i tried another method which i thought would work but isnt. Is there any reason you see why it wont work or is this just a bad way to do it?
The OBX's have the segment ID in the OBX.1 so i searched for the ADDENDUM: , set to variable and tried to null the segments that are lower than that number.
System
Originally posted by Gary Atkinson
I believe this *should* work but I didn't test it. You could add in the Else in the IF to copy OBX based just %g1 if addendum was not found. I am little rusty on my xlates but I thought I would give it a try :P
System
Originally posted by Eric Fortenberry
I threw a TPS proc together for this problem. Let me know if it helps.
http://gist.github.com/2933489
Thanks,
Eric
Jim Kosloskey
No neerd for Tcl you just need to use your own counter.
The counter you set up in the iteration is pointing to the current inbound occurrence and you need to point to a different occurrence using a pointer.
Once you learn this technique your capabilities will grow significantly.