Alteryx Designer Desktop Discussions

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

Dynamic Select Tool - If formula to select fields based on condition

anwerm2
7 - Meteor

Hello - I need help in writing a conditional formula in Dynamic select tool. I want to use and keep one workflow to use two different version of tabs new version and old version. So in the Dynamic Select tool I am trying to write this formula but it is not working. The tab name is same for old and new.

IF [Name]="Capex" THEN [FieldNumber] in (1,2,3)
ELSE
[FieldNumber] in (8,9,10)
ENDIF

 

New version of tab

F1F2F3F4F5F6CapexF8F9F10
JanQ1 TotalFebMarAprQ2 TotalMayJunJulQ3 Total

Old version of tab

F1F2F3F4F5F6F7F8F9F10
JanQ1 TotalFebMarAprQ2 TotalMayJunJulQ3 Total

 

So what I am trying to do here is when I run workflow it should go and check if column "Capex" is exist then select 1,2,3 columns ELSE select 8,9,10 columns

I am most interested to use some formula in Dynamic Select Tool instead of using Transpose Tool.

Thank you in advance.

 

3 REPLIES 3
Bennel_Wilson
8 - Asteroid

Hi,

I tried multiple ways of doing it and each time the reverse of the formula seemed to be working. I found it strange too.

 

 

IF [Name]="Capex" THEN [FieldNumber] in (8,9,10)
ELSE
[FieldNumber] in (1,2,3)
ENDIF

 

Output:

Bennel_Wilson_0-1589577893067.png

 

 

Strange!! But it works 😛

Regards

Benn
 

DavidP
17 - Castor
17 - Castor

The formula in dynamic select doesn't work exactly like you'd expect.

 

This is how I would do it. It works for both scenarios. 

 

DavidP_0-1589581102844.png

 

anwerm2
7 - Meteor

Fantastic David - it is working fine. Thanks a lot for your help

Labels