Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
TheOC
16 - Nebula
16 - Nebula

You may have noticed that almost all built-in tools in Alteryx have an example workflow you can open from the right-click menu:

 

image001.png

 

But have you ever wondered why there’s no way to add an example to your own macro? Well… You actually can! Let me show how.

 

1. Craft a (very serious) macro

 

I’ve created an incredible macro that doubles any number:

 

image002.png

 

The patent is pending on this one—please don’t steal my groundbreaking design.

 

Save this macro into your macros folder, so it appears in your Designer tool palette:

 

image003.png

 

2. Create an example workflow

image004.png

 

Here’s the important part: this workflow must be saved inside your Alteryx installation’s Learn One Tool at a Time folder:


C:\Program Files\Alteryx\Samples\en\02 Learn_one_tool_at_a_time
💡 If you’re using Designer in a language other than English, replace ‘en’ with your language code (e.g., ‘fr’ for French).

I created a new folder in here and saved my example workflow as:
C:\Program Files\Alteryx\Samples\en\02 Learn_one_tool_at_a_time\OC_Examples\Doubling_Example.yxmd

3. Edit your macro file

 

Right-click your macro file in File Explorer and choose Edit with Notepad (or Notepad++, if you know, you know)

Inside the <MetaInfo> section, look for these lines:

image005.png

 

Replace them with something like this:

 

image006.png

 

The key here is to set the file path to be a relative path from the Learn One Tool at a Time folder.

 

4. View your example workflow


Boom. Now, when you right-click your macro in Designer and choose the Description text above, your custom workflow will open exactly like Alteryx’s built-in tools:

 

image007.gif

 

That’s it! You’ve now just unlocked an extra layer on top of your macro building skills. This is fantastic for:

  • Documenting your macros for teammates (We all know a Steve who needs guiding through a macro 3 times)
  • Provided guided demos alongside tools
  • Document edge cases/usages of your macros.

 

If you do try this, let me know what creative examples you add to your macros. I’m currently 2 days of development into a ‘triple any number’ macro, so that will be my next.

Comments
BS_THE_ANALYST
15 - Aurora
15 - Aurora

Honestly, @TheOC, this is awesome. Didn't even know this was possible 😂. I wish I knew this when I started using Alteryx! 

 

Is it also easy to create the tool descriptions for the macros? (unlocked when you left-click on them)

BS_THE_ANALYST_0-1756214818326.png

 

All the best,
BS

 

Erin
11 - Bolide

Thanks @TheOC! I love how you weave humor in with learning! No promises on not borrowing your groundbreaking design. Copying is a form of flattery, so they say... 

TheOC
16 - Nebula
16 - Nebula

hey @BS_THE_ANALYST 
Great question! I definitely should have mentioned that in the blog so thanks for bringing it up.

That setting/configuration can actually be found in the 'meta info' tab of the tool:

TheOC_0-1756215053764.png


So thankfully it doesn't require messing with the XML as much.


TheOC
16 - Nebula
16 - Nebula

@Erin If I see you go live on the Alteryx Community Gallery with a number doubling tool 😡😡

Pilsner
13 - Pulsar

Very clever stuff @TheOC. I agree Steve will benefit from this, but I reckon I would too. I've created macros before, then come back after a few months and struggled to use them properly, let alone if I'm handed someone else's. This definitely seems like one of those long-term gain situations, well worth doing!

BS_THE_ANALYST
15 - Aurora
15 - Aurora

You're not wrong @Erin I broke out into laughter when I saw "OC" and "Legend" in the same sentence  

WinkEyeWinkGIF.gif

Erin
11 - Bolide

@TheOC - so what if I credit "the OC" and "Legend" if/when I post my completely original doubling macro on the Alteryx Community Gallery? I can also give you 10% of the royalties from this free macro. You're welcome.

TheOC
16 - Nebula
16 - Nebula

@Erin