- Posts: 109
Advance Read File Number
- JD Cox
- Topic Author
- Offline
- User
Less
More
8 years 1 month ago #2908
by JD Cox
Advance Read File Number - Post(2908) 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 1 month ago - 8 years 1 month ago #2913
by FlowHeater-Team
Best wishes
Robert Stark
Replied by FlowHeater-Team on topic Advance Read File Number - Post(2913)
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
Attachments:
Last edit: 8 years 1 month 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 month ago #2914
by JD Cox
Replied by JD Cox on topic Advance Read File Number - Post(2914)
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.270 seconds