Start Free Trial

Alteryx Designer Desktop Discussions

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

Iterative Process within Batch Macro

knnwndlm
9 - Comet

Hi SME, 

 

I have a workflow that's reallocating any negative value to one year forward and one year backward setting the 1 year backward/forward to zero if they're negative.  This is shown in the three examples shown in the Excel file.

 

What I struggle with is the case where I have more than one year with negative values in a given tile.  If I were to filter for tile #3, then my batch macro would work since it only has to deal with one negative amount to be re-allocated.  If I were to filter it for tile #2, then I would run issues of having to figure out how to deal with multiple negative items to be re-allocated (rows 6 & 7).

 

I was thinking of using an Iterative macro to embed in this Batch macro to see if that works.  Any suggestions?

 

Thanks,

kwl

6 REPLIES 6
ashleyharvey19
6 - Meteoroid

Working with batch macros in an iterative way can get confusing fast, especially when the tool keeps looping without producing the expected output. I like how the thread breaks down the need to separate iteration logic from the batch process itself. Building a smaller prototype flow first usually helps spot where the macro hands data back, so you can adjust the interface tools before scaling the whole thing up.

dataguyW
11 - Bolide

The iterative macro is essentially a FOR loop in code.   You can nest them just fine, but you need to know what is getting passed in and out and have a good design so you don't get yourself lost.

Hasanparvez
5 - Atom

Let me know if you come across desire solution, I would love to know how you have designed an Iterative macro to embed in a Batch macro

knnwndlm
9 - Comet

@Hasanparvez - I haven't been able to work on this because I discovered what I'm feeding into the batch macro is not complete. For tile #142, I have 78 records going in but 5 fell off. Any ideas what could have caused this?

knnwndlm
9 - Comet

@Hasanparvez - Figured this out...Has to do with configuring the Output Mode to Auto Configure by Name.

knnwndlm
9 - Comet

@Hasanparvez - Do you have any suggestions on how to approach the original problem without using an iterative macro?

Labels
Top Solution Authors