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

List box linking to formula

vishtrack
7 - Meteor

Hi folks,

 

I have a specific scenario where I need to link the List box from interface tool to Formula tool.
Based on the selection on the list tool, the values in the If condition needs to change. How do I achieve this?

3 REPLIES 3
apathetichell
19 - Altair

via an action tool to replace part of your formula tool. Note a listbox can create multiple values which may not fit what you are trying to replace in a formula tool. An example would be helpful.

vishtrack
7 - Meteor

Hello, thank you for the response.

 

I need to include the list of values in a IF formula.

The formula is as below-

 

If Contains ([Country], "US") Then 0 ElseIF 

Contains ([Country], "UK") Then 0  ElseIF

Contains ([Country], "India") Then 0  else "1" Endif

 

The user should be able to select the list of other countries such as "AUS"/ "IRE"/"MON" etc during the run, based on the selection the above formula needs to change. Thanks in advance

 

caltang
17 - Castor
17 - Castor

Hi @vishtrack - I'm not fully clear on your formula, but to build on the advice of @apathetichell , you can try my workflow:

image.png

 

The configuration needed on the List Box itself is something like this:

 

image.png

 

The areas highlighted are the key parts you need to configure. In this case, the formula you are replacing is the values in a list - a la ("").

 

In addition, I believe you'll have a list of values (countries in this case) that you'd like users to select. You can go a step further and put it into the list box connection from a file drop down OR you can even use a fixed list referencing a YXDB with (NAME && VALUE) fields only.

 

Let me know if this helps give you more ideas.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels