Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Using List Box to Update a Filter Tool

ekurutz
6 - Meteoroid

Hello,

 

I want to use the List Box to allow users running a workflow to select which fields to filter on. All the examples I have seen in the discussion forums have been using the List Box to select filter values rather than the fields to filter. Does anyone know if this is possible?

 

 

 

 

4 REPLIES 4
apathetichell
19 - Altair

Ok. so first off swap from listbox to dropdown - dropdown takes in 1 selection - listbox takes in many as I understand it you will be filtering:

[field]=null()

as opposed to:

"hello" in (names of field1,field2,etc)...

 

understand type requirements and set up your dropdown so that whatever fieldtype is in your expression works with the dropdown field... next configure your action tool to replace [field1] in your expression.

 

hit run - you'll need to do this to populate your dropdown.

 

hit the app wand button.

ekurutz
6 - Meteoroid

So what I am looking to do is to specify which fields I want to filter on using the listbox tool.  The user would select all the application fields that should be filtered on and then the filter function would be updated accordingly. For illustration purposes I've included the filter formula with the X's being the field names that would be updated based on the users selections from the list box.

 

[X1] != "NO" OR [X2] != "NO"

apathetichell
19 - Altair

I can't say that won't work -that would be levels easier with a transpose and then a compare you'd use a listbox - create a list and use an [name] in ("test") where your listbox action tool updates "test" (with the quotes) and your value ="NO"

 

every field updated requires a separate action tool - so you'd potentially have to have as many action tools as potential fields you have... You could use some crazy dynamic replace system to build out your logic and then send that into your filter via batch macro - but you probably want to do the version outlined in the first paragraph.

clmc9601
13 - Pulsar
13 - Pulsar

Hi @ekurutz,

 

I bring good news! This is possible with a single action tool, at least to my understanding of your goal! 

 

Just create a custom list in your listbox. You'll make use of the separator and the end values to build your formula-- I hope you have a rather short formula, or else it'll be a lot of typing.

 

The results are better seen using the debug workflow:

Here's my configuration:

clmc9601_0-1628112298457.png

 

Here are the debug results:

clmc9601_1-1628112340226.png

 

I've attached the sample workflow for reference. I used a crosstab to quickly get sample data-- you won't need it.

 

If this helps, please consider marking it a solution so others may find it. 

 

Happy solving!

Labels
Top Solution Authors