Start Free Trial

Alteryx Designer Desktop Discussions

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

Creating a macro for a frequently used process

EEnglish2
7 - Meteor

We're just starting with Alteryx and have begun to develop a few workflows.  We have a process that creates a filename based on today's date and then gets that HR file from a network folder.  We then import the data from that file with a Dynamic Input and then format some of the data.

 

We will need to use this process in many future workflows, so we'd like to make a macro for simplicity.  I've discovered, though, that I cannot convert the Directory input object to a Macro Input.  Is there any way around this?

 

EEnglish2_0-1652383653713.png

 

7 REPLIES 7
IraWatt
17 - Castor
17 - Castor

Hey @EEnglish2,

Assuming you want to be able to change the directory your looking at you will want something like this:

IraWatt_0-1652384080450.png

The control parameter passes the directory location then the action tool will update where the directory tool looks. The Alteryx community has some great videos on batch and other macros if you haven't checked them out. 

HTH,

Ira

 

EEnglish2
7 - Meteor

The directory is static.  The HR reports will always be there.

IraWatt
17 - Castor
17 - Castor

@EEnglish2 Then there is no need for it to be an input as its static, the user doesn't need to input anything.

EEnglish2
7 - Meteor

That makes sense.  So then how can I bundle this to make it easier to add to other workflows?

IraWatt
17 - Castor
17 - Castor

@EEnglish2 The second you add a macro output it becomes a macro file. You can save it and distribute it. If you save it to your macro folder users can access it from there ribbon else if you can just insert it like this if its already open:

IraWatt_0-1652384532363.png

 

DataNath
17 - Castor
17 - Castor

Was going to say the same as @IraWatt (no need for a macro input) - I actually built something similar this week! Mine basically checks the folder for the most recently created and then pulls it then outputs it into my workflow for use. In your actual workflow you'll just plug the output into your next steps with the file you want.

DataNath_0-1652384707679.png

 

ChrisTX
16 - Nebula
16 - Nebula

From the Interface category, add a Folder Browse tool and connect it to your Directory tool.  Alteryx will add an Action tool, and the default action (Update Directory with Folder Browse) is what you'll need.

 

Then choose menu option View > Interface Designer and click the magic wand on the left to test your Macro.  Click the Browse button and choose a folder, then click Open Debug.  Alteryx will create a new Debug tab that you can then run like a regular workflow.  The Debug tab has all of the interface elements removed, and the tools connected from the Action tools are updated to reflect the results of the action tools, before you clicked the Debug button.

 

Macros can be quite a challenge to master.  The Video Training Index https://community.alteryx.com/t5/Videos/Video-Training-Index/td-p/45161 used to have several videos on macros.  Not sure why so many of the videos are now gone. 

 

ChrisTX_0-1652384505259.png

 

Chris

 

Labels
Top Solution Authors