A macro is a workflow or group of tools built into a single tool that can be inserted into another workflow. Create a macro to save an analytic process you perform repeatedly. Use the macro within a workflow without having to recreate the analytic process each time.
Save a macro as a .yxmc file to be used in Designer or uploaded for sharing in the Alteryx Analytics Gallery or a private Gallery.
A macro consists of a workflow and a user interface created using Interface Tools. See Interface Tools and Interface Designer Window.
To build a macro:
If you are using an existing workflow, select the portion of the workflow that you want to save as a macro, then copy and paste it on a new workflow tab.
By default, the workflow type changes to Standard Macro when a Macro Input tool is added to a workflow. The macro type defaults to Batch Macro when you add a Control Parameter tool to the workflow. To create an iterative macro, set the macro type to Iterative.
To set the macro type:
Save a macro for future use and sharing. Save macros with a unique name to a specific location. In Designer, you can create a macro repository mapped to a location on your computer or network to easily save macros and use them in a workflow.
To save a macro:
To share workflows that uses custom macros, export the workflow to ensure that all workflow dependencies, including the macro, are saved with the workflow. The workflow must include a relative path to the macro. See Workflow Management and Workflow Dependencies Window.
In Designer, you can map to the location where you save macros and create a macro repository to easily save macros and use them in a workflow. Any macro .yxmc file in the selected location displays in the tool category on the Tool Palette.
To create a macro repository:
Sub-folders in a search path cannot be added individually if their parent folder already exits in the Macros repository.
To set a default repository location:
To use a macro that is saved to your macro repository, find the macro in the Tool Palette or use Search.
To use a macro that is not on the Tool Palette, right-click the workflow canvas and select Insert > Macro. Any macro that is currently open on the canvas can be selected from this list or you can browse to the location of a different macro *.yxmc file.
To differentiate a macro from a tool within a workflow, select the Display macro indicators on tools option to display the icon in User Settings > Canvas. See User Settings.
To view a macro's workflow, right-click the macro in a workflow and select Open Macro. A macro in a workflow is automatically updated when changes made to that macro are saved.
To share workflows that uses custom macros, export the workflow to ensure that all workflow dependencies, including the macro, are saved with the workflow. The workflow must include a relative path to the macro. See Workflow Management and Workflow Dependencies Window.
Macros are included in Alteryx Designer to help you learn to use and create macros:
©2018 Alteryx, Inc., all rights reserved. Allocate®, Alteryx®, Guzzler®, and Solocast® are registered trademarks of Alteryx, Inc.