Hi all,
I still have the following issue and can't figure out of how to solve it.
In the first subjob I create all relevant data for the further subjobs, including the calculation of the number of loops the data later should be processed on. Each row created contains the actual salary values of an employee. The basic row will then be multiplied for budgeting and forecast reasons max. 25 times(=months) or less if an employee leaves before the end of the budgeting period. This is done in the second subjob.
Basically the whole thing is working with the exception, that the context variable (= max. amount of loops) seems always to be taken from the last employee in the list. To work correctly the context variable should be taken per employee and assigned a value for each iteration of the loop.
Actually, if the calculated number of loops is 25, the loop will run 25 times for all the employees. If the calculated number of loops is 6 then it will run 6 times per employee for all employees.
How can I assign the "To"-variable of the loop with the calculated value for the number of loops for every employee individually? The "To"-Value of the loop contains the variable "context.iterationCount", it's just the value of the context variable which is wrong. The loop should run for example like this:
- 1. employee --> 25 times
- 2. employee --> 25 times
- 3. employee --> 4 times
==> This should result in a total number of rows of 54, with the actual setting it does it only 12 times
- 1. employee --> 25 times
- 2. employee --> 25 times
- 3. employee --> 4 times
- 4. employee --> 25 times
==> This should result in a total number of rows of 79, with the actual setting it does it 100 times
Below is the printscreen of the job design (using TOS 5.5.1)
Hope, anybody could give me a hint of how to make it work correctly.
Regards, Felix