Creating single response database questions
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 Click Insert > Question > Database Question > Single Response, or press Alt+I, Q, D, D, G.
The
Data Link Properties dialog displays. Specify the database provider and connection string.
For more information on working with database questions that are derived from an Excel spreadsheet, see
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 Either type the connection string parameters in the Connection string field, or click Edit to open the Data Link Properties dialog. You can select a database provider, and specify the connection string parameters.
When the questionnaire file is opened from an UNICOM Intelligence Interviewer - Server Admin, UNICOM Intelligence Author does not open 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 enter the connection string in the Connection string field; click Test to verify whether the connection string works with UNICOM Intelligence Interviewer - Server Admin.
4 Select the 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. You can 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 of 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. You can write mrScript that can be used to further filter the response list returned from the database (on the
Script tab), or write SQL
Where clauses in the
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
The task pane that contains several options. If it is not 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 clear 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 clear 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.
Default displays responses in the order they appear in the response list.
Random displays responses in a random order.
Rotated displays responses in rotation so that each response takes a turn at being first in the list.
Reversed displays responses in reverse order so that the last response in the list appears first.
Ascending or Descending display 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 enables you to enter an expression filter in the At box.
Filtering database questions by another database question
1 In the At box, choose a database question whose answer controls the responses to be displayed for the current question.
A dialog asks, “Would you like to replace the current connection string for this question with the connection string of {selected question name}?”.
▪Yes replaces the current connection string with the selected database question’s connection string.
▪No retains current connection string, 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: click it to open the Filter dialog. You can write mrScript that can be used to further filter the response list returned from the database (by using the
Script tab), or create SQL
Where clauses in the
WHERE section. For more information, see
Filter dialog.
When prompted, confirm that the responses defined for the chosen question (the parent question) might 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 are ordered in rows, split into as many columns as necessary.
If you select columns in the Orientation field, the responses are 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