Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Designer: Is it possible to call a macro within a dynamic filter batch macro

aksmoke
5 - Atom

Purpose:  Searching for a more elegant solution than stringing together a series of filters to call a corresponding macro.

 

I understand how to create a dynamic filter utilizing control parameters within a batch macro.  However, how can I pass that value to dynamically call the macro?

 

For example, if the control parameter value = "Axx" and the target macro to be called is named "Cleanse_Axx.yxmc":

Is there a way to manipulate an existing tool to perform this action? 

Or alter the dynamic filter batch macro XML source to call "Cleanse_{control_param_valu}.yxmc"?

5 REPLIES 5
aksmoke
5 - Atom

Thanks, Chris.  I've reviewed each of the examples, and others that reference the XML update process.  However, I am still unable to alter the specific macro to be called.  Each of my batch macros are specific to the crosswalk series to be cleansed.  So it is not the values\fields within the macro that need to be updated but rather the actual call to the macro.  If the control parameter = Axx, call Cleanse_Axx.yxmc; ideally a dynamic solution would facilitate the macro name to be passed in as Cleanse_{control parameter}.yxmc.   

 

According to the following chain, a more elegant (fully supported) workflow option does not exist: 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Crew-Macro-Conditional-Runner/td-p/491...

 

Please let me know if I've overlooked a better solution.  

 

apathetichell
18 - Pollux

Is your question can you do this - or how do you do this? For "can you change which macro you are calling on the fly?" the answer - is yes... See https://community.alteryx.com/t5/Engine-Works/Dynamic-Hard-Coding-Chained-App-Sorcery/ba-p/764585

 

You'll basically need to have some kind of chained app where you edit the call to the macro in a flatfile... Have I mentioned that it may be easier to build conditional routing or something to choose which macro to call? To be clear - you cannot directly attach an action tool directly into a macro (and I've tried).

aksmoke
5 - Atom

Okay....now that I like!  I'll accept as the official solution as soon as I get it running.

Thank you!

apathetichell
18 - Pollux

fyi - <EngineSettings Macro=".\YOUR MACRO NAME HERE" />  is the specific part of the text file you'll need to edit... .\ refers to the location...

Labels