- Posts: 109
Advance Read File Number
- JD Cox
- Topic Author
- Offline
- User
Less
More
8 years 1 day ago #2908
by JD Cox
Advance Read File Number was created by JD Cox
I’m using a control number during imports that I pick up with a Replace Heater from a .csv file. This number can only be used one time. At the time of the import I would like to advance that number. I can run a second def advance the number in question but it writes it to a new line. What is the best way to handle this?
Thanks, JD
Thanks, JD
Please Log in or Create an account to join the conversation.
- FlowHeater-Team
- Offline
- Admin
8 years 10 hours ago - 8 years 10 hours ago #2913
by FlowHeater-Team
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.
Replied by FlowHeater-Team on topic Advance Read File Number
Hi JD,
You need the power of FlowHeater Parameters
In your case you have to define one parameter (e.g. ID). Set the default value to the desired one and activate the option “store”. With this FlowHeater creates automatically a new file [definition name].fhpara to store parameter values for the next run.
To increment the value just once per each run (not in test mode) you need a .NET Script Heater with the little script below. In the configuration dialog you have to set “Execute when” to “Finish”. With this setting the value are only increment once at the end of the import/export process.
Note: The value are automatically stored when you execute the definition. When you execute the definition just in “Test mode” the parameter values are not changed!
Attached you´ll find a little example how it works.
Define the parameter
Script to increment tha value
You need the power of FlowHeater Parameters
In your case you have to define one parameter (e.g. ID). Set the default value to the desired one and activate the option “store”. With this FlowHeater creates automatically a new file [definition name].fhpara to store parameter values for the next run.
To increment the value just once per each run (not in test mode) you need a .NET Script Heater with the little script below. In the configuration dialog you have to set “Execute when” to “Finish”. With this setting the value are only increment once at the end of the import/export process.
Note: The value are automatically stored when you execute the definition. When you execute the definition just in “Test mode” the parameter values are not changed!
Attached you´ll find a little example how it works.
Define the parameter
Script to increment tha value
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:
Last edit: 8 years 10 hours ago by FlowHeater-Team.
Please Log in or Create an account to join the conversation.
- JD Cox
- Topic Author
- Offline
- User
Less
More
- Posts: 109
8 years 1 hour ago #2914
by JD Cox
Replied by JD Cox on topic Advance Read File Number
Wow, that is way better then what I was trying to do. Robert I can not thank you enough.
The power of FlowHeater makes my job so much easier it works great.
Thank You, JD
The power of FlowHeater makes my job so much easier it works great.
Thank You, JD
Please Log in or Create an account to join the conversation.
Time to create page: 0.274 seconds