We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

How to Ensure Macros Are Inserted with Relative Paths

SophiaF
Alteryx
Alteryx
Created

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

 

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

 

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
 
 
 
  1. Right-click > Insert > Macro > Browse... > select the macro from a mapped drive (S:\users\etc)
ExampleXML View
  
  1. Right-click > Insert > Macro > Browse... > navigate to the path (referenced as a UNC/Network path) and select the Macro file
ExampleXML View
 
Comments
Webbm
5 - Atom

Hi, I have tried all the bottom 3 methods and my macro is still being inserted as a relative not full path. Any help appreciated, not sure why mine is acting differently.

 

*** EDIT ***

 

For anyone having a similar issue, the CReW macros I have were installed from on my company server. I Uninstalled then re-Installed them from my local drive, this allowed me to insert the full path using the 3 methods listed above.