Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Iterate records to rollup to active manager for multiple records

SecureBoot
5 - Atom

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

 

SecureBoot_0-1758300042803.png

 

2 REPLIES 2
OTrieger
14 - Magnetar

@SecureBoot 

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.

dreldrel
8 - Asteroid

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 

Labels
Top Solution Authors