Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

2018 Inspire -- Macros 301 -- Formula Issue

smoskowitz
12 - Quasar

Hi All --

 

I took the macros 301 with Nick and Zac and they went into a macro that changed up the sample tool a little bit. The macro essentially recreated the Sample tool but allowed you to take a sample in one output, and everything else would come out of the other output.

 

What I am struggling to remember is how he wrote the formula. I know we had to represent each Mode: First, Last, Skip......etc)

 

 

What I can't seem to remember, is how to write the if-then formula to represent the user's selection. I started a formula like this:

 

IF [#1] THEN [Destination] ELSE [Destination] ENDIF

 

But I know I am missing something and I have not yet been able to find anything in the community on how to change the mode.

 

If you have any docs on doing this, it would be very much appreciated.

 

Thanks,

Seth

 

 

 

 

 

2018-06-28_9-05-50.jpg

1 REPLY 1
Claje
14 - Magnetar

Without knowing much about this particular training, I'm going to use an example of First/Last for this configuration with two radio buttons.


With two, you could write something like

 

IF [#1] THEN 'First' Else 'Last' Endif 

and that should work.

 

If you added a third value (lets say 'Skip'), you may want to change this to use ElseIF

 

IF [#1] THEN 'First' ELSEIF [#2] THEN  'Last' ELSE 'Skip' ENDIF



It could also be helpful to call out all of the options specifically, so that you know which is which, with an 'error' state if none are selected (since this should be impossible)

 

IF [#1] THEN 'First' ELSEIF [#2] THEN  'Last' ELSEIF [#3] THEN 'Skip' ELSE 'Error' ENDIF
Labels