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?
Solved! Go to Solution.
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
Thanks, I found this to be very useful today.
Thanks. It's really helpful.
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?
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!
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 🙂