FlowHeater - The Data Import / Export Specialist
See also the existing examples of using the TextFile Adapter , which may answer your question: text file codepage converting 1 / 2 , processing of CSV header and footer rows , Import/Export vCard (line based) text files

Can FH change codes per logic

  • Andrew Wojciak
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 5 months ago #2810 by Andrew Wojciak
Can FH change codes per logic was created by Andrew Wojciak
Can FH do this? If yes, how?
• Read site: .TXT file, example ‘DTNA_FORECAST_20160803AWsample.txt’, is attached.
• On the Write side same .TXT file but AL53 codes in the 2nd column should be changed per logic: If AL53 in the 2nd column AND (013 or 058 or 065) in the 3rd column THAN change AL53 to AL53X [or append X].
When designed correctly change from AL53 to AL53X should be done only in the top three rows of the sample file.
Thank you for assistance,
Andrew
Attachments:

Please Log in or Create an account to join the conversation.

More
6 years 5 months ago #2811 by FlowHeater-Team
Replied by FlowHeater-Team on topic Can FH change codes per logic
Hi Andrew,

Of course, that´s the power of FlowHeater :-)

I’ve made as short example for you, please have a look to the attachment.

Example description
First you need one String Append Heater to create the check condition for the IF-THEN-ELSE Heater . The String Append Heater combines the second and the third column with “#” as delimiter, for example “AL53#013”. The output can now be checked in the If-THEN-ELSE Heater . In your case you need three “or” conditions like the screenshot below.

Is this the cases (second input) you need one more String Append Heater to add the X at the end of the field content. Otherwise (else, third input) you have to put the second column directly without changes to the IF-THEN-ELSE Heater .



File Attachment:

File Name: change-col...tion.zip
File Size:2 KB

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Attachments:

Please Log in or Create an account to join the conversation.

  • Andrew Wojciak
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 5 months ago #2814 by Andrew Wojciak
Replied by Andrew Wojciak on topic Can FH change codes per logic
Very quick and comprehensive response. Thank you Robert.

Please Log in or Create an account to join the conversation.

Time to create page: 0.323 seconds

other Languages

de

FlowHeater Home

de en

Imprint/Contact

Privacy Statement

Copyright © 2009-2023 by FlowHeater GmbH.
All rights reserved.

Follow us on

twitter  facebook

YouTube

 de en