This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
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?
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
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:
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:
I then processed this string with the TextToColumns tool, breaking first on commas, splitting to rows...
Once I had that, I could use TextToColumns again, using equals as the splitter, and split to columns...
Then I could use a Filter to drop all rows where the second column was false, and drop the True/False column...
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!