Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Use List Box to decide which containers to run in a Macro

apatel1501
7 - Meteor

I have a macro with 8 containers (each with a macro output). For the sake of this post, the containers are named 1-8.  I want to use a list box so the user can check which containers they would like to run. I need help making these connections. Not sure if an action tool or a condition tool is needed to connect to the list box and if so, how to configure them.

 

Thanks in advance!

5 REPLIES 5
apathetichell
19 - Altair

are these standard containers or control containers? it's easiest to use the listbox in generate list mode pass it into an expression via an action tool and to update a value in an IN expression so like 'myvalue' in ('values generated from my listbox') ---> when your listbox containcs values like 'myvalue1','myvalue2' etc---> and at run time your expression becomes 'myvalue' in ('myvalue1,'myvlaue2') because of the actio tool.

 

to have the listbox update the cotainers eanbled/disabled property you would need to update this element via an action tool with a formula. the formula would be 'test' in (#1) ---> where #1 is the result of the listbox. 'test is a specific value relating to a specific container. This would yeidl either a true or false which would enable/disable the container base upon it's underlying setting.

apatel1501
7 - Meteor

I think i follow. I am using standard containers.

 

I connected my list box in generate list mode to a condition tool and used the following formula: contains([#1],"Container1=True") and connected the True side of the condition tool to an action tool to enable/disable container from condition.

 

But it won't let me connect the action tool to a container for some reason. Screenshots attached. When i try to do connect the action tool, it won't allow it.

 

ActionTool.pngConditionTool.pngListBox.pngInterfaceTools.png

 

 

apathetichell
19 - Altair

delete the condition tool. it goes listbox-> action tool -> container. no condition tool. Having said that ---> you want IN - not contains. let me give you an example:

contains('hello','hell') ---> true

'hell' in ('hello') - false

 

in looks for a distinct element in a list of elements. contains does a character match. if you had 11 containers and were searching using contains:

 

contains('container 11','container 1') -> would be true. 

 

'container 1' in ('container 11') would be false

apatel1501
7 - Meteor

Perfect - thanks!

Labels