Skip to main content
simply more productive

The Data Specialist

Thanks to our intuitive transformation designer, you can convert data effortlessly to a variety of formats without knowing how to program. It’s not only efficient, it’s also easy to use.
Up to 100,000 records can be processed with the freeware version!
Flowheater Chart

Excluding Field

  • Herbert Berkley
  • Topic Author
  • Offline
  • User
  • User
More
12 years 5 months ago #2240 by Herbert Berkley
Excluding Field - Post(2240) 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.
Attachments:

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

More
12 years 5 months ago #2241 by FlowHeater-Team
Replied by FlowHeater-Team on topic Re:Excluding Field - Post(2241)
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

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

Time to create page: 0.256 seconds
FlowHeater Logo

FlowHeater - The Data Specialist

Efficient data integration and transformation with FlowHeater – the perfect solution for a seamless transfer of your data.

Legal information

Support & Contact

Contact

Phone:
0951 / 9933 9792

eMail:
This email address is being protected from spambots. You need JavaScript enabled to view it.


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