This article describes how to go from two or more tables...
...to an R table that switches between them based on a Control box selection:
Requirements
- Two or more tables. Here, we will use date by gender and age by gender tables.
- A Control box or an R-based Calculation that outputs the names of the tables. Here, we will use a combo box that includes the table names of Date and Age:
Method
1. Select your first table and from the go to Table > Select in the toolbar. You can also manually select the table under Inputs > TABLE 1 > Tables in Page(s) in the object inspector, if you first create a table via Table > Select. Here, we will use our date by gender table.
2. OPTIONAL: Choose the appropriate Select rows/columns by option. In this example, we will leave the default settings.
3. OPTIONAL: Select the rows and columns to display under Rows/columns to include. Again, we will leave the default settings.
4. Select your second table under Inputs > TABLE 2 > Tables in Page(s). This will be our age by gender table.
5. Adjust the appropriate selection options as per steps 2 and 3. In this example, we will keep all the defaults for Select rows/columns by.
6. OPTIONAL: Add a third table under Inputs > TABLE 3 > Tables in Page(s) and repeat the above steps until you have all tables included.
7. Once you select more than one table, a TABLE SELECTION group will appear at the bottom.
8. Enter the name of the tables under Table names (default 1, 2, ...) to match the control box items, i.e. Date, Age
. Names are separated by a comma and must match the order specified in the control.
9. Select your control box under Toggle between tables using. The item names in the control should match Table names.
10. OPTIONAL: Update Properties > APPEARANCE > Decimals and Number format as required.
Next
How to Select Specific Rows and Columns to Appear in a Table
How to Select Specific Rows and Columns to Appear in a Date/Time Table
How to Use a Control Box as an Input for Calculations