Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Condition & Detour Configuration

Winston
7 - Meteor

I've been trying to get my head around blocking certain areas of the workflow to not be run based on certain criteria.  I want the workflow to be able to run as fast as possible, so blocking code that just doesn't need to be run for a certain set of criteria seems like the logical design to take.  I've tried different iterations of using Filter, but that does not work as both outputs are executed.  I did some internet/community searching and found several instances of using Detour within a macro as an option.  Conceptually, this seems to be like what I need to do.  Unfortunately, none of the examples I found fit what I'm trying to accomplish.  So I started trying different configurations, but I just can't get it to work.  Below is what I have been working with.  The error I'm currently receiving is listed on the right below, and the tools mentioned are reflected by the red arrows.

 

Actual files are attached.

 

Any suggestions?

 

Winston

 

Winston_0-1661144339822.pngWinston_1-1661144388651.png

 

 

5 REPLIES 5
DataNath
17 - Castor
17 - Castor

@Winston as far as I know, it's not possible to set up the flow in this way and have your condition coming from within the data. The condition tools tend to act on user input from other interface tools where a question is offered i.e. has a certain box been ticked? If so, do X... etc

 

I'd say your best bet is to go down the route of filtering. If you're only expecting one 'Type' in your data then the data successfully passing through the relevant filter will be processed and the other output stream will have to deal with 0 records and therefore shouldn't impact performance.

Amol_Telore
11 - Bolide

Hey @Winston 

 

As @DataNath has already mentioned, it is not possible to get the desired results with given configuration. Few things to note here.

  1. Map Input Question anchor can only be connected to Drop down and List Box tool and in some cases it can be connected to action tool.
  2. While updating value of detour tool using Action tool, we need to specify the value that needs to be replaced i.e. Instead of True you need to specify False and then replace that False with True keyword if condition is true.

Thus, I have re-designed your macro to get the desired outcome. 

Amol_Telore_0-1661163090192.png

Hope it solves your issues. PFA for reference. 

 

Regards,

Amol Telore

Winston
7 - Meteor

@DataNath Based on the tools we have available, that makes sense.  Thanks

@Amol_Telore This is what I have implemented.  Not how I had envisioned it, but it works.  Thanks

hellyars
13 - Pulsar

@Winston   Wow. 

Love your original question/challenge. 

I am trying to edit my macro to ignore a off-shoot of a workflow when a field to be parsed is not present.

A Filter tool does not prevent the unused off-shoot from generating an error that prevents any output from the marco.

I tried using CReW Ensure fields, but then you have to brute force the solution with a multiple Ensure Fields tool for every parse tool in the off-shoot stream.  

CullenJ
6 - Meteoroid

@hellyars did you find a good solution?

Labels