Introduction
This article describes how to create a long selection list of items to appear in a Control's item list.
This article contains the steps required to take you from a long list of items (such as a list of countries found online) to a table in Displayr...
...and finally, to the same list appearing in a Control box item list, or as a List Box item menu:
Requirements
- A Control Box control (see How to Create a Combo Box Filter or How to Create a List Box Filter).
- A list of items.
Method
- Locate your list, eg. an online table consisting of a list of countries. Note if the list of items can be found in an existing variable you can create a table using the variable and skip to step 10.
- Select the whole table (including row and column headers).
- Right-click > Copy.
- In Displayr, select Table > Paste or Enter Table.
- A new R Output will appear. In the object inspector select Paste or type data.
- A dialog box containing an empty spreadsheet will appear. On your keyboard select CTRL+V (Paste).
- OPTIONAL: In case only one column of the desired table appears, open Excel, right-click > Paste, followed by right-click > Copy. Repeat steps five and six.
- OPTIONAL: In the Enter or Paste Data dialog box, remove all redundant rows and columns that you don't wish to appear in the item list menu. To do that, select rows/columns you wish to delete, right-click > Remove Row(s) / Remove Column(s).
- OPTIONAL: Rename the table by selecting it and going to the Properties tab in the object inspector > General > Name, and input the desired name (eg Country_List).
- Go to the Anything menu, and select Page Design > Control > Combo Box (Drop-down) or List Box.
- With the control selected go to the object inspector > Control > Item List and delete First option; Second option, leaving the menu empty.
- From the Items from drop-down menu select the table with the list of items (eg Country_List).
- OPTIONAL: Depending on your requirements, you can change Selection mode from Single selection to Multiple selection.
See Also
How to Create a Combo Box Filter
How to Connect Filters to Controls Using R Code
How to Create a List Box Filter
How to Create a Text Box Filter
How to Create a Combo Box (Drop-Down Control) With a Dynamic List
How to Use the Same Control on Multiple Pages
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
Comments
0 comments
Article is closed for comments.