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.
Flowheater Download

Excluding Field

  • Herbert Berkley
  • Topic Author
  • Offline
  • User
  • User
More
11 years 9 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.
Attachments:

Please Log in to join the conversation.

More
11 years 9 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.
Attachments:

Please Log in to join the conversation.

Time to create page: 0.262 seconds

FlowHeater - The Data Specialist

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

Rechtliches

Support & Contact

Kontaktinformation

Telefon:0951 / 99339792 E-Mail:This email address is being protected from spambots. You need JavaScript enabled to view it.

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