Overview
Tables are used in surveys to create a battery, or grid, of similar questions. Some common tables include rating scale (Likert) tables, brand comparison tables, and sum to 100% tables. IntelliSurvey lets you create a wide variety of tables simply by changing the combination of tags to define appearance and answer requirements. Simple table creation mimics standard question structures, requiring fewer tags, while advanced table construction requires start table
and end table
tags, along with the type
tag.
In a table, you define "questions" through rows and/or columns. This means that a table will require responses per row (default), or per column (vscale), and may also contain unique responses for each row-column combination. The optsfrom
tag (or a built-in options list) is required in closed-ended tables.
In this section you will create many commonly-used table types and learn about formatting, headings, and cell manipulation tags. You'll begin by learning how to build simple tables.
Related reading and resources
Creating tables involves various programming considerations that influence their structural appearance, functionality, performance, and dataset storage arrangement. The following articles serve as references for understanding these considerations within this training module:
- Table types overview
- Tables
- Table formatting and headers
- Table row validation and column validation
- Table cell manipulation
- Ordering tables: rows, columns, and options
- Contratext tables.
Simple tables - Basic structure |
Option Lists | Tables Setup Discussion |
TID. Table question text here. |
As with other question types, option lists are often important table building blocks. Use the following lists as a foundation for this tutorial: set list: SHAPES 1. Circle 2. Square 3. Triangle 4. Rectangle 5. Trapezoid set list: PLACE 1. At work 2. At home 3. In nature 4. The city |
The "simple" table structure mirrors other question types in the SPL (Survey Programming Language). The question number is used to define the table ID (TID) or table name. Question text follows this ID, and property-defining tags are listed on subsequent lines. Similar to questions, tables require a |
Tables overview video
The following video covers how to create tables using the "question style syntax" (a.k.a., "simple tables") method. We review common table types and the tags frequently used to create them. We recommend watching this video before you continue with the tutorial.
Response by row
The tables in this section will be structured using row elements as "questions," requiring one response per row. These tables use the SHAPES list to define the rows. The options are defined locally, by the series
tag, and with the PLACE list.
Questionnaire Content | Discussion Details | Coded SPL |
B1A. How common or rare is each shape? Options: 1=Common, 10=Rare [One per row] Circle, Square, Triangle, Rectangle, Trapezoid |
Table rows are defined by either the Answer options are defined in either a local list or via the The Each shape will get a number as it's overall rating. |
B1A. How common or rare is each shape? |
B1B. How many of each shape do you typically encounter per day? Options: None, 1 - 5, More than 5 [One per row] Circle, Square, Triangle, Rectangle, Trapezoid |
A table can utilize the pulldown question type, which also requires single choice responses, one answer per row. A hybrid approach to defining answer options can be used by invoking the This table uses the |
B1B. How many of each shape do you typically encounter per day? |
B1C. Do you talk about shapes in any of these places? Options: At work, At home, In nature, The city [All per row] Circle, Square, Triangle, Rectangle, Trapezoid [Include opt-out option] I don't discuss them |
Tables that require a select-all-that-apply approach will use the checkbox question type. A decline to answer (DTA) option can be defined via the |
B1C. Do you talk about shapes in any of these places? |
B1D. Do you see shapes in any of these places? Options: At work, At home, In nature, The city NEW: I don't [All per row] Circle, Square, Triangle, Rectangle, Trapezoid |
An |
B1D. Do you see shapes in any of these places? |
Training Tutorial Routine |
Continue to work in your FLast_r8_intro survey (visit Training tutorials for set up steps) and add the new content from each practice section via the Survey Editor. When the survey compiles successfully, launch Testmode by clicking the Test 2 button from this screen. Review your survey and test your new questions. After testing your survey, be sure to make any necessary corrections. Next, add dummy data records. Finally, review the data output by viewing a Response report or creating a new export in Deliverables. Tip! An Excel export contains both a Data and a Questions tab. The Questions tab can be used as a "key" for option number information at each question. |
Data storage for response by row
Discussion Details |
An overall table ID is created for each table. In this newly added section, TB1A, TB1B, TB1C, and TB1D are the table IDs (TIDs). The default table ID separator is R, a row indicator. Thus, every table ID has a data column or field for each of it's rows (i.e., QB1AR1, QB1AR2, QB1AR3, QB1AR4, QB1AR5, QB1BR1, QB1BR2, QB1BR3, etc.) Tip! The default ID separator can be changed with the TB1A and TB1B are radio tables, the Topline report tiles show the responses in aggregate for each table. In the Response report and export files, variables are created for each row. TB1A creates QB1AR1 through QB1AR5, storing the number selected, from '1' to '10', for each shape. TB1B creates QB1BR1 through QB1BR5, also storing the number selected, from '0' to '6', for each shape. In total, 10 data locations are exported, five for TB1A and five for TB1B since each has five row-questions. |
TB1C is a checkbox table, similar to radio tables. The Topline report tiles show the responses in aggregate for each table. The Response report shows one variable for each shape, QB1CR1 through QB1CR5, storing a comma-separated string of the option IDs selected. In export files, the data for TB1C is even more granular, creating variables for each shape (row) by each place (option). R1 is row 1, storing places selected for 'Circle' from the SHAPES list. This creates QB1CR1.1 for the 'At work' option, QB1CR1.2 for the 'At home' option, QB1CR1.3 for the 'In nature' option, and QB1CR1.4 for 'The city' option are created. Each of these locations will contain a '1' or '0', depending on if the option is selected or not for circles. R2 is row 2, and QB1CR2.1, QB1CR2.2, QB1CR2.3, QB1CR2.4 are created for storing places selected for 'Square' from the SHAPES list. R3 is row 3, storing places selected for 'Triangle' from the SHAPES list, and so on for each of the five shapes. The In total, TB1C exports 21 locations: four options ('At home', 'At work', 'In nature', 'The city') multiplied by five shapes, plus a DTA field. |
TB1D is also a checkbox table creating variables for each shape (row) by each place (option). A similar number of locations are generated for this table. The difference between TB1C and TB1D is that the Each of these locations will contain a '1' or '0', depending on if the option 'I don't' is selected or not. In total, TB1D exports 25 locations: five options ('At home', 'At work', 'In nature', 'The city', 'I don't') multiplied by five shapes. |
Contrasting text tables
The contrasting text table (a.k.a., contratext table) has text option content on both the left and right side as designated by a ||| ("triple pipe") separator. The answer options for this type of table are placed in the middle, between the contrasting text.
The tables in this section use tags from the Contratext tables article. The example below uses inline rows, though setlists may also be used with contratexts.
Questionnaire Content | Discussion Details | Coded SPL | ||||||||||||
B2. Indicate your preference for each pair of statements.
|
A triple-pipe tag can be used to display list items that have contrasting option labels on either side. The tag can also be used with any table text tags (i.e., Version Notice: The The Tip! Table formatting defaults to best content fit. If adjustments are needed, use formatting tags.
|
B2. Indicate your preference for each pair of statements. |
Data storage for contratext
Discussion Details |
TB2 is a standard radio table creating fields QB2R1 through QB2R5. Each stores a '1', '2', or '3', depending on which option was selected for the pair. Tip! The |
Response by column
Vertical scale tables (a.k.a., vscale tables) are tables that use the columns as questions, with respondents selecting options for each column instead of for each row. Vscale tables are only for use with radio or checkbox tables.
Questionnaire Content | Discussion Details | Coded SPL |
B3A. Which attributes do you associate with each shape? [Check all that apply for each shape] Across: Circle, Square, Triangle, Rectangle, Trapezoid Down: Useful tool, Pleasing lines, External boundaries, None of these |
For tables that require recording multiple choice responses per column, a vscale tag can be invoked. When using this feature, the table's inner questions are now defined using the colsfrom tag as opposed to rowsfrom . |
B3A. Which attributes do you associate with each shape? |
B3B. Select two features that best describe each shape. [Check two for each shape]Across: Circle, Square, Triangle, Rectangle, Trapezoid Down: Shapely, Geometric, Uniform, Precise, Symbolic |
To enforce a specific number of selections per column, the Tip! Column validation tags may be used for more advanced response enforcement. Table rows have similar row validation tags. |
B3B. Select two features that best describe each shape. |
Data storage for response by column
Discussion Details |
An overall table ID is created for each table in this example, TB3A and TB3B. The default table ID separator for a vscale table is C, a column indicator. Tip! You can override the default with the TB3A is a vertical scale checkbox table, and the Topline report tile shows the responses in aggregate. In the Response report, variables QB3AC1 through QB3AC5 are created, storing a string of comma-separated numbers based on the selections. In export files, the data for TB3A is even more granular, creating variables for each shape. For C1, circle selections, we have four data columns — QB3AC1.1 for 'Useful tool', QB3AC1.2 for 'Pleasing lines', QB3AC1.3 for 'External boundaries', and QB3AC1.99 for 'None of these'. Each of these locations will contain a '1' or '0' depending on whether the option is selected or not. For C2, square selections, QB3AC2.1, QB3AC2.2, QB3AC2.3, and QB3AC2.99 are created. This pattern continues on for each shape. In total, TB3A exports 20 locations: four options (tool, line, boundary, none) multiplied by five shapes. |
TB3B is treated the same way as TB3A since it is a vertical scale checkbox table as well. TB3B has five options, where TB3A has four. It will end up with a few more export variables, but otherwise the reporting is very similar. The Topline tile will provide an overview of the table responses in aggregate. In the Response reports, one variable for each shape is created, storing a comma-separated string, just like TB3A. The difference is based on the option IDs selected. TB3A can store any combination of '1', '2', '3', or '99', and TB3B can store any combination of '1', '2', '3', '4', or '5'. In export files, the data for TB3B will expand out into the more granular levels as well. In total, TB3B exports 25 locations: five options ('shapely', 'geometric', 'uniform', 'precise', 'symbolic') multiplied by five shapes. |
Advanced tables
"Advanced tables" use a different syntax from "simple tables" and are instead created with the start table
widget. Though any table could technically use advanced table syntax, there are specific scenarios in which Survey Programmers (SPs) must use start table
to create the tables required in their survey
Advanced tables - Basic structure |
Option Lists | Tables Setup Discussion |
start table: TID |
As with other question types, option lists are often important table building blocks. |
The advanced structure is the more traditional method for programming tables in our SPL. Advanced tables have 'start' and 'end' tags to contain inner, property-defining tags. The Similar to questions, tables require a A multi-type table can be created with the |
Custom columns
The --
(double dash) tag is used to define multiple, unique table columns, which is also called a multi-type (or multi-column) table. These tables require responses per column, and various tag combinations can be used to customize the column questions. In addition, tags such as enablewhen
can be used to create interactive columns.
Questionnaire Content | Discussion Details | Coded SPL |
B4. Enter your preferences for each shape you use. [Select yes/no to indicate use] [ASK COLOR AND SIZE FOR EACH SHAPE WITH YES] Color: Black, Blue, Green, Orange, Purple, Red, Violet, Yellow Size: [numeric entry in inches] |
The The The Caution: Although a code approach is functional, that doesn't necessarily mean it's the best possible research approach. This battery of questions could be better asked as separate questions on subsequent pages. Asking a respondent to "Select the shapes you use," and then following up with color and size inquiries for only those shapes the respondent uses, is simply a cleaner experience for those answering the survey and would mitigate respondent fatigue. |
start table: B4 |
B5. Please provide your contact information: |
This table demonstrates our ability to have different datatypes for two of the rows in a text table. The same method can be used to serve alternate options via pulldown at different rows.
The |
start table: B5 |
Data storage for multi-columns
Discussion Details |
In TB4 the columns are labeled C1, C2, and C3 by default. Tip! The Tip! Each column is given a default COL designation, COL1, COL2, COL3. These designations can be used in condition logic statements to reference the columns. In this example, __COL1__ is used with the Appending TB4 by each unique column results in QB4C1 for 'Use', QB4C2 for 'Color', and QB4C3 for 'Size'. In the Topline report, this creates three tiles, reporting in aggregate for each column defined. In the Response report, the data is comprised of each selection for each shape in each column. This means that each of the table's question columns (Use, Color, and Size) gets a variable for each shape. So, for the first question column - C1 - this creates QB4R1C1 for circle use, QB4R2C1 for square use, QB4R3C1 for triangle use, QB4R4C1 for rectangle use, and QB4R5C1 for trapezoid use. For the next question column - C2 - the variables created are QB4R1C2 for circle color, QB4R2C2 for square color, QB4R3C2 for triangle color, QB4R4C2 for rectangle color, and QB4R5C2 for trapezoid color. The last question column creates five more variables ending in C3; QB4R1C3 for circle size, QB4R2C3 for square size, QB4R3C3 for triangle size, QB4R4C3 for rectangle size, and QB4R5C3 for trapezoid size Since TB4 columns have single choice and open-end options, locations do not expand out for each option like multiple choice data. All of these columns store numeric string data. In total, a TB4 Excel export has 15 locations: three preferences ('use', 'color', 'size') multiplied by five shapes. |
TB5 will follow the same data layout as a standard text table. The major differences have to do with the |
Caution! PII must be handled in accordance with specific protocols. Neglecting to implement necessary precautions to safeguard PII can lead to legal consequences. If you have any questions or concerns about PII, contact a Support agent by clicking "Submit a request" at the top of any documentation page, using the Help modal below, or emailing help@intellisurvey.com.
Table formats
Various formatting tags can be used with tables to add column totals or to individually manipulate the cells. Additional formatting tags can be added to set sizes, alignments, randomizations, and more.
Questionnaire Content | Discussion Details | Coded SPL | ||
B5A. Select the properties that you like about each shape. |
To provide options with relevant properties, TB5A uses the The TB5A uses a combination of Tip! Use decorators to add logic or replace the input field with text, or an image.
|
B5A. Select the properties that you like about each shape. |
||
B5B. Do you know the formula to calculate the area of each shape? |
In TB5B, The |
B5B. Do you know the formula to calculate the area of each shape? |
||
B5C. What percent of space would you use for each shape? [Must total 100%] [SHOW TOTALING ROW] Circle, Square, Triangle, Rectangle, Trapezoid |
The Note: |
B5C. What percent of space would you use for each shape? |
||
B5D. What shapes come to mind? [CAPTURE RESPONSE; ALLOW UP TO 10 SHAPES] |
The A single-line
Tip! This is also known as using the |
B5D. What shapes come to mind? |
Data storage for previous exercises
Discussion Details |
At TB5A, the rows that have cells blanked out will store a limited set, or subset of option IDs. For example, shapes that do not have round sides will not be able to select option '4. Curve(s)'. QB5AR8 for Star, for example, will never store '4' because curves can't be selected with stars. View the Questions tab of an Excel export to confirm this. TB5A generates a total of nine data locations, one for each of the five shapes from the SHAPES list, and four more for each inline shape. |
TB5B is a very common use for the TB5B generates a total of 11 data locations, one for each of the five shapes from the SHAPES list, four more for each shape from TB5A.rows (the inline shapes defined at TB5A), and two more for autoother. Note: Here the autoother is a row for a radio table; it will take on standard radio table data conventions. Similarly, a variable (named QB5BR97) is generated, but instead of '1' for checked and '0' for not checked, it will store a '1' when 'Yes' is selected. Since the |
TB5C dynamically adds the values typed into each row and shows a running total in the last row. The The While it is possible to set a The Tip! The TB5C generates six locations in total, five for the shapes from the SHAPES list, and one for the SCT variable. |
Practice what you've learned
Now that you've had a chance to upload and work with many tables, get more practice by completing this short survey.
Note: Create a new survey using the 'MR Questionnaire Design' survey (linked below). Use the survey ID 'FLast_qnr_design', and description 'First Last Design Survey'.
The concepts covered so far are primarily used in this Questionnaire Design Survey. It has a few standard radio tables, a contratext table, a checkbox table with exclusive options, sum-to-100 table using the SCT tags, and a ranking question.
A few new concepts are used in this questionnaire as well. The links below will provide more details for setting them up in your survey. Many of these instructions are covered again in later tutorials.
- The skip for the section after Q1 (see
condition
tag in the Groups article) - Q4 uses the card sort widget.
- Q6 needs a
settext
withexplain
for the pop-up text. - Q9 uses the new rank question type.
- Q10 will benefit from the
revealrows
tag.
Reminder, once you create the new content, submit the changes, and review and test it, publish your survey before moving on to the next tutorial.
Comments
0 comments
Please sign in to leave a comment.