A List box control is nice when you want to show all/more options at once to the viewer for filtering. This is with the trade-off of list boxes taking up more space on your Page. This article describes how to create a List box control to filter outputs on your page. The article contains the steps to take you from a Page containing a grid of bars chart....
...to a Page containing List Box Filters on an Output that can be used to filter the chart.
Requirements
- An item to filter on a Page (e.g., table, chart, visualization, etc.).
- Variable sets to use as filters, (structured as Nominal, Ordinal, or Binary-Multi)
Method
- Select the output(s) you wish to filter with the List Box menu.
- Go to the Anything menu and select Filter > Control > List Box Filters on an Output.
- Select the variable sets you wish to use as filters and select OK. You should try to select all variable sets you want to use as filters in the document to make the filtering more efficient.
List box menu(s) will appear on the Page. Displayr will create a new List Box Filter variable in the Data Sets tree linked to the List box selections. Displayr will also automatically apply the filter variable to all the outputs selected in Step 1.
Other Considerations
- This filtering is specific to this page and list box only. Once you get your filtering setup as you like it, you may want to show and apply the same list box controls on multiple pages:
- You can apply the filter variable created to outputs on other pages, but those filters will be based off of this specific List box on this specific page. This is useful if you want a page of filters that will be used to apply to the whole document.
- To show the same list box on multiple pages while keeping the selected items consistent across those pages, see How to Use the Same Control on Multiple Pages for how to do this.
- Keep in mind any item selected in the list boxes when you Publish a Document will be the default item selected in View Mode.
Next
How to Use the Same Control on Multiple Pages
How to Create a Combo Box (Drop-Down Control) With a Dynamic List
How to Dynamically Change a Question Based on a Control Box
How to Select Which Rows or Columns to Show in a Visualization Based on a Control Box Selection
How to Switch Logos and Images Based on a Control Box Selection