Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

List Box & Filter Tool

ddavis216
6 - Meteoroid

I am creating a macro with a List Box tool that allows users to a filter a large dataset by selecting their region comprised of select states. I am challenged with properly configuring the List Box tool through the Action tool both connected to the Filter tool. Can someone please take a look at the attached screenshot which shows the current settings and offer insight?

10 REPLIES 10
Garrett
11 - Bolide

I'd recommend using the 'Generate Custom List' option in the List Box Configuration, with the goal of building up a list of Regions to put into the Filter tool as part of a [Region] IN ("abc","xyz") expression.

 

Then your action would be configured to "Update Value (Default)", pointing at the "Expression - value", and leveraging the "Replace a specific string" option.  See attached screen shots

ELPyatt123
7 - Meteor

Thanks, I found this to be very useful today.  

Hadzramin_Rahman
8 - Asteroid

Thanks. It's really helpful.

asifk
8 - Asteroid
This works great!

Thanks guys the decimeter was a colon

Happy solving!

Regards
Asif

Sent from my iPhone
asifk
8 - Asteroid

Thanks Alot, 

Finally understand how to use a List Box Tool.

 

I have a question

the Values that you select will be used in the filter, i would like to add some form of description next to each line item and not affect the original values

 

eg. my choices are as follows:

10

20

30

40

50

 

I would like to have details like below 

10 - All Match

20 - Partial

30 - One

and so on....

 

is this possible?

BenMoss
ACE Emeritus
ACE Emeritus
when defining your list you can write two statements per line, a name and a value. The value is the bit that is passed into the workflow and the name is what the application/macro user will see.

So something like.

All match;10
Partial;20

And so on (though i cant rememver what the delimiter is)

Ben
MarqueeCrew
20 - Arcturus
20 - Arcturus
10 - something:10
20 - anything:20
30 - whatever:30

Etc etc.

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Hiblet
10 - Fireball

I found it really helped to understand what was going into, and coming out of, the listbox, when trying to use a database or file as the items to display. 

 

To populate a listbox from a file or database, you need a Name and a Value field.  The Name is the pretty text that is shown to the user.  The value is what the tool returns when the options are selected.  Both are text. Example:

 

    Name,Value

    OptionNameA,OptionA

    OptionNameB,OptionB

    OptionNameC,OptionC

 

I would usually keep the Name and Value the same, but you can use pretty text for the user if you wish.

 

The listbox returns every Value item, with a True and False flag, as a text string.  Assume the user selects OptionNameA and OptionNameC:

 

    OptionA=True,OptionB=False,OptionC=True

 

I then processed this string with the TextToColumns tool, breaking first on commas, splitting to rows...

 

    OptionA=True

    OptionB=False

    OptionC=True

 

Once I had that, I could use TextToColumns again, using equals as the splitter, and split to columns...

 

    OptionA,True

    OptionB,False

    OptionC,True

 

Then I could use a Filter to drop all rows where the second column was false, and drop the True/False column...

 

    OptionA

    OptionC

 

I could then do a Join to the original data and get only the J output as rows that were selected by the user.

 

I could not find that kind of info anywhere, so I hope that helps someone else!

Srini07
5 - Atom

Dear Garrett,

 

Thanks a lot for your detailed explanation on how to have the settings. I have been looking almost for a month for this . THANKS 🙂

Labels