Hello,
I would like to create an iterative macro that given a terminated user, can run a query to find their manager and continue this process until an active user is found. For example. If user A has the manager user B has the manager user C, when user A is terminated, it returns user B. If both user A and B are terminated, it returns user C.
I have an iterative macro that works for one user, but as soon as I pass in multiple records at once, it gives an exponential amount of results, some of which are duplicates, some of which are incorrect. How can I ensure that the macro iterates one record entirely before moving on to the next? I cannot upload the sample workflow here due to company policy, but will be happy to provide more explanation if needed
Maybe you can simplify it by separating it into different steps, get one macro to find manager B and then based on condition if B is terminated then the data goes to the next iteration in a nested macro.
Or you can nest your macro in a batch macro. The batch macro will take each time one employee and do the check and then the next employee over and over for each of the employees.
You may want to use a control container to help you achieve this. You can control the iterative process by the containers, so you can achieve similar ideas with fewer results. If this helps, please like the comment
User | Count |
---|---|
108 | |
89 | |
78 | |
54 | |
40 |