Inserting dynamic text

Dynamic text (or piping) is a feature in online editions that lets you change text in your questionnaire based on the responses entered by the respondent. This provides a personalized experience as the respondent progresses through the questionnaire.

There are many uses for dynamic text:

  • change the question text based on the responses to previous questions
  • change the answer codes based on the responses to previous questions
  • customize instructions based on the responses to previous questions
  • include text created using a derived variable calculated from a previous response
  • insert system paradata including case number and interview date and time information

Inserting a previous response into the text

In Snap XMP Desktop, inserting a Variable field adds dynamic text to the questionnaire. The dynamic text shows in the questionnaire as the variable name in curly brackets {}, for example, {Q1}. The text substitution takes place during the live interview and the respondent sees the dynamic text.

  1. Open the survey in the Questionnaire window.
  2. Position the cursor where the dynamic text will appear.
  1. Set the Topic drop-down to Font as this shows the Insert button.
  1. Click the Insert button and select Variable Field from the menu. This displays the New variable field dialog.
  1. Complete the fields to define the dynamic text:
    • The Variable list contains all the variables and paradata for the questionnaire. Select the variable to insert from the list.
    • In Aspect, select the type of text to insert. There are three aspects to choose from: Reply inserts the question response; Name inserts the question number and Context inserts the current context.
    • In Modify case, choose the case used to display the text: Normal, UPPER CASE, lower case, Sentence case, Title Case.
  1. Click OK. The question number is displayed inside curly brackets, e.g. {Q1}, this will be replaced by the dynamic text when a respondent is answering the questionnaire.
  1. Click Save SaveIcon.png to save the changes made to the questionnaire.
  2. You can test the text substitution by publishing the survey and launching a preview in Snap XMP Online.

Using text substitution automatically adds a page break above its location in the questionnaire. You do not see a page break in the Questionnaire window but the interview process inserts the page break.

Example of dynamic text

In this example, an initial multi-response question asks the respondent about their social media use and a subsequent question uses this answer.

  1. The first question asks about social media use and allows multiple responses.
  1. The second question ask a further question about social media use and includes the response to the first question. The dynamic text is inserted with the placeholder {Q1}. If more than one answer is selected in Q1 they will be substituted as a list. This is shown in Step 4.
  1. During the interview the respondent selects three answers in Q1.
  1. When the respondent clicks Next, the next page displays Q2. The answers from Q1 are substituted in Q2 where the {Q1} dynamic text placeholder is positioned.
Contents