Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!

Alteryx Designer Desktop Discussions

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

Directory Tool with Batch Macro

daprice
6 - Meteoroid

Hello,

 

I am trying to dynamically import multiple files from a consistent parent folder. Essentially I want the directory tool to go out and select the top X number of files based on an interface tool input of how many files were dropped. I originally tried using a Dynamic Input but I am having issues with Data Schema even though the files are all the exact same template.

Steps I am taking:

  1. Directory Input Tool with File Specification *Payroll Costing Results - U.S.*.Xlsx*
  2. Sort Creation Time Descending
  3. Select First X records based on input from user in Interface tool
  4. Macro
    1. Control Parameter
    2. Update Value File to replace the specific String
    3. Output Anchor 
  5. Select tool to connect to main workflow that is manually adding each file today.

 

 

 

7 REPLIES 7
alexnajm
18 - Pollux
18 - Pollux

This all generally looks correct - what's the question?

daprice
6 - Meteoroid

I can't get it to run successfully the data does not come through the workflow. Any thoughts on why that is?

alexnajm
18 - Pollux
18 - Pollux

It's hard to diagnose without knowing the error - what is it error showing?

 

Two things typically to check:

- Is the Action tool updating the file correctly? I would probably change the setting to "Update Input tool"

- Is the batch setting configured to Auto Configure by Name? this is set in Interface Designer

alexnajm
18 - Pollux
18 - Pollux

More info here: Article Detail (alteryx.com)

daprice
6 - Meteoroid

Thanks Alex! I am not currently getting an error message there is just no data coming off the files. I will go through the attached article to see if that helps with what I am seeing. I am also working with our customer support team for the AIP we are in to see what help I can get there. 

alexnajm
18 - Pollux
18 - Pollux

Without having the macro and files it'll be hard to help further, so yes hopefully the article helps or I bet the team for the AIP can help too!

daprice
6 - Meteoroid

We were able to do this with a Dynamic Input tool. The missing link was the Sheet Name. Since the Directory tool doesn't bring in Sheet names we had to add a formula to create the Sheet name field for the Dynamic Input tool to pick up. This fixed the Macro as well but it is no longer needed due to dynamic input.

Labels
Top Solution Authors