Hi,
I would like to know whether it would be possible to change iteration number in accordance with the chosen file.
My first attempt was to connect 'file browse' tool to 'drop down' tool, so that the number of records within the file would be input as the iteration number. However this does not seem to change the iteration number.
Any help would be greatly appreciated!
Solved! Go to Solution.
I believe we need to move the Interface Tools outside of the Macro.
And A batch macro is the one we should use?
Attached is only a sample.
Hi @Qiu,
Sorry for not catching up with our previous question, but I did take a look and found that iterative macro would better serve the intended purpose rather than batch macro.
So.. I was wondering if it would be possible to pass the row count as an iteration number outside the macro as you mentioned.
Many thanks!
Can you check if this works for you. Please note it is just the idea, and you need to fine tune it into your really work process.
Hi @Teresa31
It's not possible to change the Engine.IterationNumber. It starts at 0 and is incremented by 1 each iteration. What you can do is change the filter where you're checking it. Instead of [Engine.IterationNumber]+2=7, use something like [Engine.IterationNumber]+[Offset]=7. Pass [Offset] into your macro, allowing to you control when the filter condition is met.
Dan
Hi @danilang,
Thank you for the reply! Maybe I was a bit misleading, I wanted to update max iteration number, not each engine iteration number (as highlighted below).
@Qiu , Thank you for your response as well. I am taking a look at your workflow and this taught me that iterative macros can take in more than one macro input. I am still in the process of incorporating this idea into the intended workflow.
Hi @Teresa31
There's no way to update the max iteration number, either. However, there are 2 stopping conditions for an iterative macro
1. Max iterations is reached.
2. The Iterative Output has 0 records
The second way is the one you want to look into. In your macro use [Engine.IterationNumber]<[MaxIterations]-1 in a filter to control whether or not to pass any records to the iterative output. See the attached for an example
Dan