ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Macro not Looping thru Files in Folder

data4actuaries
5 - Atom

Hello, 

 

I am creating a macro that consolidates files with different columns from a certain folder. The input files also has headers and footers that needs to be removed before consolidation. 

 

The problem is that my macro does not loop through the different files in the directory. I'm not sure what I'm doing wrong. 

 

I have set the macro to type = "Iterative Macro". Are there other switches that tell Alteryx to loop through the different input files? 

 

I'm attaching my workflow with sample data in case anyone is interested.

 

Thank you!

DA

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@data4actuaries 
Typically a Batch macro should have a Control parameter, which is not seen in your macro.
I modified the workf and Macro as attached assuming your data is having same schema.

0113-data4actuaries-A.png0113-data4actuaries-B.png

Gaurav_Dhama_
12 - Quasar

Two important points to note here.

  1. Iterative macro is not working because an Iterative macro requires two outputs, one that is the desired output (D) and one that is not (X), this undesired output (X) is what feeds back to the Macro and it iterates over it until there are no output from X. Which is not happening in the attached macro.
  2. You don't need an Iterative macro that again contains batch macro. Batch macro will just work fine for your requirement. As Qiu has done, you would just need to use a batch macro. And the parent flow can be a standard workflow or a standard macro. Unless you are iterating over different directories, in which case you will have to configure it as mentioned in point 1.
Labels
Top Solution Authors