FlowHeater - The Data Import / Export Specialist
See also the general examples available, which may answer your question: Hello World 1 / 2 / 3 , format numbers as character strings , simple If-Then-Else , complex If-Then-ElseIf , filtering and grouping data , consolidate grouped values

Excluding Field

  • Herbert Berkley
  • Topic Author
  • Offline
  • New Member
  • New Member
10 years 6 months ago #2240 by Herbert Berkley
Excluding Field was created by Herbert Berkley
i am using some code that creates a file name based on a field.. it also includes that field into the file being created. i use the unique field for each file but i don't want to throw it into the created file..

here is my code..
public object dowork()
if (invalues.length != 2)
throw new exception("2 inputparameter expected!");

// get the textfile adapter from the write side
textfileadapter adapter = (textfileadapter)adapterwrite;

// build the new filename using the invoicenumber = second input parameter
string filename = (string)invalues[1].getstring();
if (filename == null)
throw new exception("not a valid invoice number!");

filename += ".txt"; // you can changes the ending by yourself

// set new file name on the write side
adapter.filename = filename;

// return the first input parameter for further processing
return invalues[0].getvalue();

i have attached an image file that shows the first number in the sequence, invoice number, that needs to be left out when generating each individual file.

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

10 years 6 months ago #2241 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Excluding Field
Hi Herbert,

You do not need a script for this anymore. With the help of Parameters this is quite simple.

You just need one String Append Heater to build the dynamic export file name and one Set Parameter Heater to set the Parameter "$Filename$" to this new value.
On the WRITE side you have to set the export file name to $Filename$ that’s all.

You can find a brief example in the attachment.

Attachment dynamic_filename_with_parameter.zip not found

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.

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

Time to create page: 0.379 seconds

other Languages


FlowHeater Home

de en


Privacy Statement

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

Follow us on

twitter  facebook


 de en