We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamically Calling a Macro Within Another Macro / Call Macro via File Path

dylanx357
5 - Atom

Hello all, I have a simple iterative macro that I am using to restart an in-DB pull whenever the row counts are below a certain threshold. The issue is that I need this to be dynamic so I can feed it a variety of inputs, while still only having to maintain one primary .yxmc file.

 

Below is the entire iterative macro (the blue dot is a standard macro, containing the conditional test logic).

dylanx357_1-1680798606330.png

 

 

One potential solution I thought of was to package the inputs that need to be dynamic into their own macros, and then in the iterative macro, I am hoping I can call the "input macro" dynamically, thereby allowing me to set the file path via the iterative macro configuration, like so:

dylanx357_0-1680798493585.png

And the iterative macro would then look something like this (just an example--this doesn't actually work).

dylanx357_2-1680799279865.png

 

Is this possible? Anyone know any tricks to get around this issue and call macros by file path? Is there a better approach entirely to achieve my objectives? Any and all help is greatly appreciated. 

2 REPLIES 2
ArtApa
Alteryx
Alteryx

Hi @dylanx357 - You may want to try the Runner tool:

 

 - https://help.alteryx.com/20223/designer/runner-tool

 - https://youtu.be/mKpJjVYH-yU 

Have you found the new ALTERYX Runner macro in the Alteryx Gallery? Are you looking for a List Runner? How about a DIY version of turning a Alteryx macro into something more robust? Alteryx ACES, Esther & Mark, will guide you through the creation of what appears to be the MVP of the CReW List ...
danilang
19 - Altair
19 - Altair

Hi @dylanx357 

 

There's no easy way to do this.  

 

Alteryx Interface tools are designed to act on the configuration of Alteryx tools.  Since the macro that you're calling is stored in the workflow configuration and not a tool configuration, there's no mechanism for an interface tool to access it.  

 

You can accomplish something equivalent by embedding all the possible macros into the main file and wrapping each in a container.  Union the outputs of all the macros and use radio buttons activate the corresponding containers effectively letting the user select which input macro will run.

 

Dan

Labels
Top Solution Authors