Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Noob Macro Question - Selecting inputs to a directory-based Macro that copies files

mix_pix
10 - Fireball

Hi,

 

I'm still quite the noob when it comes to macros in Alteryx.  I've read a number of posts and built a few basic ones, but I keep finding myself stumbling over what I suspect are some very rudimentary steps.  So before I spend more time hunting around for the answer, I figured I'd throw the question out to the community and await the very simple answer. :-)

 

Here's what I want to do:

 

I have a workflow that looks at files in two directories (source and destination) and then copies over only the new ones.  A screen-shot of it is below.  I set it up initially for a specific project where the directory and file spec (e.g. Waterfall*.xlsx) parameters were always constant.  But the steps are generic enough that I'd like to be able to run it for any number of projects and simply change the directory paths and file spec values.

 

I envision a simple table with the following values:

 

1. Project Name

2. Source Directory

3. Source File Spec

4. Destination Directory

5. Destination File Spec

 

What I'd like to see is that when I select a Project Name, it feeds values 2-5 into the macro and then just runs it.  This way I could call the macro from different modules and then just determine, based on the module and the project it is supporting, which values to pass in.

 

How would I go about doing this?  Thanks in advance.

 

copy files workflow.png

2 REPLIES 2
NeilR
Alteryx Alumni (Retired)

Here's a good video you should watch about how to make a macro:

Given your use case, consider turning your workflow into an analytic app rather than a macro:

For either an app or a macro, basically you need to drag down interface tools for each question you want to ask the user (table values 1-5 in your post). Connect them to the tools that need updating. There are other details that the videos should cover.

 

If you go with a macro, once you're done, you can insert the macro into a workflow by right-clicking a blank section of the canvas and selecting the Insert > Macro option.

 

Give that a shot and we'll be happy to answer follow-up questions if you get stuck.

mix_pix
10 - Fireball

Thanks Neil.  Those videos did help me finally connect the dots on how these interface tools work.  I was able to turn my workflow into an app where I can choose from a dropdown of options and then use formulas in the four action tools to feed the right inputs into the directory tools.  Very cool.

 

 

copy files app.png

Labels