Welcome to the Alteryx Knowledge Base

How to Ensure Macros Are Inserted with Relative Paths
user

Created/Edited - 4/28/2026 by Sophia Cooper | Alteryx

Procedure

How to Ensure Macros Are Inserted with Relative Paths


Designer will reference the macro location (macro path) differently depending on the way in which the macro is inserted onto the Canvas. This can be important when you have a mapped drive that references macros, and especially when you want to promote workflows to different environments (Dev > Production) without needing to manually change the workflow.

By default, Macros are packaged with the workflow when you publish the workflow to the Server. This is useful if the macro does not need changes or only exists on your local machine. However, if you are sharing macros with colleagues or need to make edits to the macros, you would not want to include the macro with the workflow, as any changes to the macro will not reflect on the published workflow.
 

What is meant by "Relative Path"?


When you add a macro to your workflow, there is a reference to the file location in the Workflow XML. To view this, you can open the workflow in a text editor, or enable viewing the workflow XML in Options > User Settings > Edit User Settings > Advanced > "Display XML in Properties Window". Then, click any blank space on the Canvas and you will have the option available:

 

When the macro is inserted with a relative path, it will default to looking for the macro in the location where you have configured Macro paths on the server. This is in: Options > User Settings > Edit User Settings > Macros.
 

Inserting a macro with the Relative Path referenced


The macro will insert itself as relative in these cases:

  1. Drag and drop from the Tool Palette.
ExampleXML View

image

 

  1. Right-click > Insert > select the name of the folder (same as in Tool Palette) > select the Macro
ExampleXML View

image


 

Insert the macro with the Full Path referenced


These are the conditions in which it will NOT insert the path as relative (meaning it will include the full path to the macro):

 

  1. Right-click > Insert > Macro > click the Macro directly (this option is only available when the macro was recently saved, as it only displays the most recently modified macro)
ExampleXML View

image

 

 

 

  1. Right-click > Insert > Macro > Browse... > select the macro from a mapped drive (S:\users\etc)
ExampleXML View

image

image

  

  1. Right-click > Insert > Macro > Browse... > navigate to the path (referenced as a UNC/Network path) and select the Macro file
ExampleXML View

image

image

 
Was this article helpful?