Creating single response database questions
If you want to create a question with a list of responses from which the respondent must choose one, and whose category lists are generated by connecting to an external database, use a single response database question type. For example: "Which is your favorite type of coffee?"
1 From the menu, choose Insert > Question > Database Question > Single Response or press Alt+I, Q, D, D, G.
The
Data Link Properties dialog box displays, allowing you to provide the appropriate database provider and connection string information.
For additional information on working with database questions that are derived from an Excel spreadsheet, ee
Working with database questions from Excel spreadsheets.
After specifying the appropriate data link property information the new single response database question displays in the Routings pane and in the Design pane.
The question has an automatically generated name: see
Automatically generated names.
2 Enter the question text, as it will be displayed to respondents, in the box under Name. For example, What is the main purpose of your current journey?
3 Manually enter your connection string parameters in the Connection string field, or click Edit to launch the Data Link Properties dialog. The dialog provides options for selecting a database provider and defining the connection string parameters.
Note When the questionnaire file is opened from an UNICOM Intelligence Interviewer - Server Admin, UNICOM Intelligence Author does not provide the Data Link Properties dialog (the dialog can not be used against the connected UNICOM Intelligence Interviewer - Server Admin). When working with files opened against an UNICOM Intelligence Interviewer - Server Admin, you must manually enter the connection string in the Connection string field. After entering the appropriate string, click Test to verify whether the connection string will work with UNICOM Intelligence Interviewer - Server Admin.
4 Select the appropriate database table from the Table field menu. The list contains all tables in the selected database that correspond to the defined connection string.
5 Click
Preview to open the Database Table Preview dialog. The dialog allows you to preview the table structure before actually mapping the database columns. For more information, see
Database Table Preview dialog.
6 Use the Column mapping table to specify which database columns will provide the survey metadata. The list Available items to be mapped depends on whether the item being edited is a loop driver or a response list inside of a categorical question. Map the Available items to the Database columns by selecting the appropriate database columns from each item's column list.
▪String items can be mapped to any database table column.
▪Boolean items can only be mapped to database table columns that are also Boolean.
▪Numeric items can only be mapped to database table columns that are also Numeric.
Available items:
Item
|
Data type
|
Database Categorical Questions
|
Loops
|
Name (required field)
|
String
|
Yes
|
Yes
|
Response (required field)
|
String
|
Yes
|
Yes
|
Key Code
|
String
|
Yes
|
No
|
File
|
String
|
Yes
|
Yes
|
Analysis value
|
String
|
Yes
|
No
|
Fixed
|
Boolean
|
Yes
|
Yes
|
Exclusive
|
Boolean
|
Yes
|
No
|
7 Click
Filter to display the Filters dialog. The dialog enables you to write mrScript that can be used to further filter the response list returned from the database (via the
Script tab), or compose SQL
Where clauses in the provided
WHERE section. For more information, see
Filter dialog.
Viewing responses
After you have defined the connection string, selected a table, and mapped the columns, you can view the Responses table in the Responses tab. When working with database questions:
▪The data displayed in the table is read-only.
▪The Advanced Category Editor is not available.
▪You cannot assign custom properties to individual database items.
▪You cannot write translator notes for database items.
1 Click Field Chooser to select the fields to display in the Responses table.
Available fields:
Item
|
Database Categorical Questions
|
Loops
|
Name
|
Yes
|
N/A
|
Response
|
Yes
|
N/A
|
Key Code
|
Yes
|
N/A
|
File
|
Yes
|
N/A
|
Analysis value
|
Yes
|
N/A
|
Factor
|
Yes
|
N/A
|
Fixed
|
Yes
|
N/A
|
Exclusive
|
Yes
|
N/A
|
2 Click Refresh to view any changes that are made to the database items during the active UNICOM Intelligence Author session.
Specifying additional question details in the Properties pane
On the right of the screen is a task pane that contains several different options. If it is not already visible, select Properties from the list.
Response Required
Indicates whether the respondent must answer the question. Check this box to prevent respondents from proceeding further in an online questionnaire without filling in a response to the question. This field is not available for True/False, Text, and Display Text questions (the field setting has no affect on these question types).
If you deselect this option for a question that does not contain a No Answer response UNICOM Intelligence Author inserts one automatically, so that respondents can choose Next for the question without having to select an answer. This response is not automatically removed if you re-enable Response Required.
Hide Question
Indicates whether the question is displayed to the respondent. Normally, respondents will see all questions, but you can deselect this box for questions that are filled in automatically by responses to other questions. This field is not available when the question is grouped in a Page, Loop, or Block.
Specifying response options
1 The Response Order field indicates the order in which responses are displayed to respondents. Choose Default to present responses in the order they appear in the response list, Random to present responses in a random order, Rotated to present responses in rotation so that each response takes a turn at being first in the list, or Reversed to present responses in reverse order so that the last response in the list appears first. Alternatively, select Ascending or Descending to present the responses in alphabetical order.
2 Click
SQL to display
SQL tab in the Filters dialog, where you can create SQL
Where clauses in the provided
WHERE section. For more information, see
Filter dialog.
3 The Filter field enables you to filter the response list based on the responses to a previous categorical database question, or by non-database questions.
▪In the first box, choose one of All Responses, Chosen, Not Chosen, or Expert Expression. Selecting Expert Expression allows you to enter an expression filter in the At box.
Filtering database questions by another database question
4 In the At box, choose a database question whose answer controls the responses to be displayed for the current question. You are presented with the dialog that asks, “Would you like to replace the current connection string for this question with the connection string of {selected question name}?”.
▪If you select Yes, the current connection string is replaced with the selected database question's connection string.
▪If you select No, the current connection string is retained and the intersection of the two response lists is used as the basis for the filter options.
Filter selection
|
Connection string replaced
|
Connection string not replaced
|
All Responses
|
Intersection of Q1 and Q2
|
Q1
|
Chosen
|
Intersection of Q1(chosen) and Q2
|
Q1 chosen
|
Not Chosen
|
Intersection of Q1(not chosen) and Q2
|
Q1 not chosen
|
Expert Expression
|
User specified
|
User specified
|
When Expert Expression is selected, the
At field changes to an ellipsis button that, when clicked, opens the Filter dialog. The dialog allows you to write mrScript that can be used to further filter the response list returned from the database (via the
Script tab), or create SQL
Where clauses in the provided
WHERE section. For more information, see
Filter dialog.
When prompted, confirm that the responses defined for the chosen question (the parent question) may overwrite the response list for the current question.
Filtering database questions by non-database questions
In the At box, choose a non-database categorical question. The current connection string is not replaced, and a list of returned responses from the connection string is filtered based on the selected categorical question.
Filter selection
|
Q1 is NOT a database question
|
All Responses
|
Intersection of Q1 and Q2
|
Chosen
|
Intersection of Q1(chosen) and Q2
|
Not Chosen
|
Intersection of Q1(not chosen) and Q2
|
Expert Expression
|
User specified
|
Specifying presentation options
Number of Rows/Columns
Controls how responses are arranged for the selected question. If you select rows in the Orientation field, the responses will be ordered in rows, split into as many columns as necessary. If you select columns in the Orientation field, the responses will be ordered in columns, split into as many rows as necessary.
Presentation
Select how the responses are presented for the selected question. Options include: Check Box, List Box, and Dropdown box.
Orientation
Provides options for displaying responses in rows or columns. Option include: Default (rows), Columns, and Rows.
See also