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.
SOLVED

How to pass a variable to a detour from a filter

joesparty
8 - Asteroid

Hello,

 

I've been trying to get the detour tool to run based on a filter within a macro.  Using this example, Solved: Re: Change Detour from left to right - Alteryx Community, I believe that example passes the input for control parameter from the workflow.  My issue is I don't want to pass it from an input, rather filter/formula.  In the attachments:

  • 01_workflow
    • Using DIR tool to capture a list of files
    • Keeping only full path field
    • Call macro
  • 02_macro
    • InputFile reads full path
    • Action updates file to import
    • Import tool reads file
    • Basic filter Contains([Field_1],"attachment;"
    • Filter tool - if true run the upper path, false run the lower path

How can I pass a variable in a macro to the detour tool?

 

Cheers!

4 REPLIES 4
ArtApa
Alteryx
Alteryx

Hi @joesparty - I think article may help you to understand how the tool works: https://www.thedataschool.co.uk/gregg-rimmer/using-detour-tool-alteryx 

joesparty
8 - Asteroid

Hi @ArtApa ,

 

Thanks for the link, I did find this post and I believe this is based off a user selecting a radio button to determine the detour path correct?  My question is how do I determine the detour path dynamically based of a formula/filter?  I'm still young in my Alteryx journey, so I many not be using the correct terminology.

 

Cheers 

ArtApa
Alteryx
Alteryx

Hi @joesparty - To change a flow direction in the Detour tool you need to change its setting, i.e. its XML. This is possible via Interface in an App or in a Macro. I think:

 

a) Something that you want to achieve is possible without a Detour.

b) You may want to re-read the article and have a look at a solution with a Macro. For example: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/New-output-file-every-month/m-p/944470...  

joesparty
8 - Asteroid

Thanks @ArtApa , your example gives me something to practice with.

Labels
Top Solution Authors