Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Alteryx App - List Box

Highlighted
Meteor

Hi All,

 

How do you enable/disable a tool container based on user selection in the Alteryx App - List Box tool?  I am currently using the following formula in the action tool but it isn't working.

 

IF !Contains([#1], "x")
THEN "False"
ELSE "True"
ENDIF

 

Any help is appreciated!

Highlighted
Alteryx
Alteryx

@JinheeS 

 

That should work. Can you run your app in a Debug mode to see what's actually happening? Alternatively can you attached it here so I can check?

Highlighted
Meteor

@MichalM thank you for a quick reply!

 

Please see the workflow attached below.

 

Thanks again!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @JinheeS the Listbox will provide an output such "x=True,y=False" so hence why your formulas don't work as they always have an x and y. Value I amended the formula to account if the output is true or false. Let me know what you think?

Highlighted
Alteryx
Alteryx

@JinheeS 

 

An alternative would be to change the configuration of the List Box tool and use the "Generate Custom List" option instead. On the back of it, you will produce a comma separated list of selected values - eg. "x,y" if both options are selected

 

list-box-values.png

 

You'd also want to update the logic of the conditional statement though. The 'True' and 'False' references the Disabled setting which works counter-intuitively ie you want to set the value to False to keep the container enabled and True to disable it. In your case it would be

 

 

IF Contains([#1], "x")
THEN "False" 
ELSE "True" 
ENDIF

 

 

Labels