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

Alteryx Designer Desktop Discussions

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

Detour based on 'None' condition in macro

Hugo
9 - Comet

Hi All,

 

I have a macro where there is a drop down list for a user to select a field - but I also want them to be able to select 'None'

 

I want to detour the workflow based on if they selected 'None' or not. The way I am doing this is with a Condition tool which updates the action tool to modify the workflow

 

However, my macro does not divert based on the selection, and I think I have the condition tool incorrectly configured (or maybe the action tool)

 

My macro looks as follows:

 

clipboard_image_1.png

 

My condition expression is:  [#1]='None' , I have also tried IsNull([#1]) but got the same result (workflow does not divert).

 

I have set the action as "Update Detour Direction from Condition" and updated detour to the Right direction.

 

Can anyone see what is going wrong with my macro?

 

 

 

4 REPLIES 4
TonyA
Alteryx Alumni (Retired)

I haven't looked through the macro completely, but the test should be [#1] = "". Here's a simple example app that I put in a yxzp since Community won't let us post yxwz files.

 

EDIT: I made the changes to your macro and am getting a slew of errors in the formula tools. I stripped out the action tools connected to the formula tools and verified that the detours are working correctly with the [#1] = "" test. But there's something wrong with the way the action tools are updating the formulas.

 

EDIT2: You need to look at the way the formulas are set up in the action tools. I think your formulas are generating toString(Account ID) without the square brackets on the column name. The errors I'm seeing are reporting an unknown variable "Account"

Hugo
9 - Comet

Thanks TonyA - nice to know the first place I was going wrong 😄 

 

I'll keep trying on the formula updating with the action tools - it's not something I have tried before so happy to muddle my way through it

TonyA
Alteryx Alumni (Retired)

My pleasure, @Hugo . Unless you'd like some more help please mark the response as a solution so people know this one is resolved and can find it if they have a similar issue.

 

Thanks!

Tony

ChrisTX
16 - Nebula
16 - Nebula

This might help to debug a macro:

  Community > Blogs > Engine Works Blog > The X-Ray Browse: Macro Debugging Made Easier

  https://community.alteryx.com/t5/Engine-Works-Blog/The-X-Ray-Browse-Macro-Debugging-Made-Easier/ba-p...

 

Also:

  

From Tips and Tricks 2019.pdf, page 73:


ANALYTIC APPS AND MACROS TROUBLESHOOTING TIPS

DEBUG WORKFLOW

Apps and Macros have a debug feature that can be used to verify your app or macro is working as designed.

To use the debug feature, open the Interface Designer (Views > Interface Designer) and select the Test View (button on the left). Fill out the information requested by your app or macro, then click on Open Debug.

 

A debug workflow will open as a new tab in your current Alteryx session.

  (A copy of the workflow will open called Debug Workflow# (# being some number))

Run the debug workflow to make sure it is creating your desired results.

 

Labels
Top Solution Authors