Desktop User Guides > Author > Changing the questionnaire order > Adding a Set Response to a questionnaire
Adding a Set Response to a questionnaire
Adding Set Response routing items to a questionnaire allows you to set the response to a specific question using the question's default answers as set in metadata, responses to other questions, or manually entered expressions. Set Response routing items are typically used in conjunction with conditional logic to set the response values for a question. For more information, see Creating a condition block.
After you add a Set Response routing item, failure to complete its configuration might result in syntax errors when running the survey.
To add a Set Response routing item
1 If it is not selected, select the Routings pane.
2 Select the question after which you want to place the Set Response.
3 Click Insert > Routing Item > Set Response.
The routing item is created with a default name, SetResponse. You can change this name if required.
4 Optionally enter a description for the routing item.
When printing draft paper surveys in UNICOM Intelligence Interviewer - Paper, this description is included. Descriptions are not included in the actual paper survey.
5 The Question to set menu provides a list of all questions from the Questions pane. Select an appropriate question upon which to apply the set response, or drag a question from the Routing or Questions pane.
6 Select an option under the Response Value section (see Response values).
7 Click the code samples button to open the help system at the Code samples topic. The codes samples are commonly used to set the response for specific question types. You can copy the code sample text, paste it into the build response expression editor field, and then edit it.
Response values
Choose response(s)
Displays responses already defined for the selected Question to set. Depending on the selected question type, the provided options will vary:
Single-response question responses are presented as a single-select list. Select the appropriate response from the list.
Multiple-response categorical question responses are presented as a multiple-select list. Select the appropriate responses from the list.
True/False (boolean) questions are presented as the options True and False.
Numeric questions are presented as an empty field, allowing you to enter an appropriate numeric value.
Text questions are presented as an empty field, allowing you to enter an appropriate text value.
Date/Time questions are presented as date/time field, allowing you to enter a specific date and time. Clicking the down arrow displays a calendar, allowing you to select a specific date.
Special responses (such as “not applicable” or “no answer”) are provided for those questions that include them.
Grid questions are not currently supported.
In all situations, users will be able to set the item to blank or default answer using a radio button. In addition, depending on the question type, the system will present a control for setting the response to the question.
Default answer
When selected, the question’s default answer is used as the set response.
When selected, a blank response is used as the question's set response. This is not the same as not selecting a question to use as a set response; it is however the same as not selecting any answers in the Choose response(s) section. This option is not available for numeric or date/time questions.
Build a response
When selected, you can define the set response to equal another question response or any other property. You can use the expression editor field to create expressions by dragging-and-dropping other questions into the field editor. You can also select the Add button to add a selected question to the field editor at the current cursor position. You can specify text (“text value”), a numeric expression (such as 5 + NumericQuestion), or the value of a question’s (or multiple questions’) properties.
The Add button is only available when double-click navigation mode is enabled. For more information, see UNICOM Intelligence Author: Menu options.
See also
Code samples
Changing the questionnaire order