Snap XMP Help

Setting an initial value

You are here:
< All Topics
image_pdfimage_print

An initial value can be set for a question. This value is selected or displayed as the default answer to the question, when a participant is completing the questionnaire. The Initial Value field can be set to a code, literal constant or an expression using values from the preceding questions, depending on the question style.

The initial value is set in the Variable Details window or Variable Properties window.

In the Variable Details window, the Initial Value field is shown when you click Toggle Definitions ToggleDefnIcon.PNG .

VarDetailsIV.PNG

The Initial Value property is also available in the Variable Properties dialog opened from the Questionnaire window.

VarPropsIVa.png

Note that the Initial Value is not available for Paradata variables or Note variables.

Using the Initial Value property

In this example, the questionnaire is set up to ask about the number of people in the participant’s party. The values that the participant enters can be used to set the initial value for a question about the number of people in the party who ordered food.

In this questionnaire, Q2 is an Open Series question asking for the number of adults and children in a group of people at a restaurant and Q3 is an Open Ended question asking how many people in the party ordered food. Usually everyone orders food so the default for Q3 is the total number of people in Q2.

The questions are created using the following step by step instructions:

  1. Open the survey in the Questionnaire window with Design mode set.
  2. Click New Question SnapDesktopPlusIcon.PNG   on the Questionnaire toolbar to insert a question.
  3. Select the Open Series style from the Style Selection Box on the toolbar.
  4. In the area marked “Click here for text”, enter “How many people were in your party today?”
  5. Click Variable Properties SnapDesktopVariableProp.PNG on the Questionnaire toolbar. This opens the Variable Properties dialog.
  6. In the Variable Properties change the
    • Response: Quantity
    • Label: Adults
  7. Insert another entry with the properties
    • Response: Quantity
    • Label: Children.
Q2.PNG
  1. Insert another Open Ended question to be used to show the number of people who ordered food. Again set the Response to Quantity.
Q3.PNG
  1. Click Variable Properties SnapDesktopVariableProp.PNG on the Questionnaire toolbar. This opens the Variable Properties dialog.
  2. Type Q2a+Q2b in the Initial Value to show the total number of people in the party. When an expression is used this automatically sets the Read Only property to Yes. Setting the Read Only property to Yes prevents a respondent overwriting or answering the question.
VarPropsIV.PNG
  1. This question needs to be on the following page so insert a page break above this question.
Q3PgBk.PNG
  1. When the questionnaire is running the participant enters the numbers in each question.
LiveQ2.PNG
  1. On the next page of the questionnaire the total number of people is used as the default.
LiveQ3.PNG
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Contents