Skip to main content
  • Customer Experience
    Customer Experience
  • Employee Experience
    Employee Experience
  • Brand Experience
    Brand Experience
  • Product Experience
    Product Experience
  • Core XM
    Core XM
  • Design XM
    Design XM

Pulling Data Into a Second Survey (Longitudinal Surveys)

What's on This Page:

Was this helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The feedback you submit here is used only to help improve this page.

That’s great! Thank you for your feedback!

Thank you for your feedback!

About Pulling Data into a Second Survey

Longitudinal research can involve following up with the same respondents later, in addition to retaining previously provided data about the same respondents. For example, you can use randomly generated IDs to link responses in an anonymous study. As another example, you can carry over certain information respondents have already filled out, such as an email address; the email will be presented to them in the second half of the study, and they can either leave it alone, or change it, if their email has updated.

This support page will explain how to connect data in two different surveys, so that the second survey prepopulates with certain information for the same respondent. You must follow the directions in every section of this support page to successfully complete your project.

Qtip: Remember that changes are only live to your respondents after you publish them! This includes any actions you may have added to your surveys.

Listing Your Fields

This project involves two different surveys and lots of different features. One thing that can help you stay organized is a list of the data you want to transfer from one survey to another. It’s important to think of short, intuitive names for each of these fields, because you will be using these shorthand names throughout the project. You also need to make sure spelling and capitalization stays the same throughout.

For example, let’s say you want to carry over someone’s employee identification number, the office where they work, and the department they work for. Your list might look like this:

  • EmployeeNumber
  • Office
  • Department

You would then want to use these same names throughout. For example, you can’t use “Employee Number” and “EmployeeNumber” interchangeably. Choose one you prefer and stick with it.

First Survey Setup

  1. Create your first survey.
  2. Add all the desired questions.
  3. Go to the Survey flow.
    navigating to survey flow and clicking add a new element here
  4. Click Add a New Element Here or Add Below.
  5. Select Embedded Data.
    selecting the embedded data element
  6. Click Move and drag this element to the top of the Survey Flow.
    moving the embedded data element to the top of the flow, and adding login ID
  7. Name this element Login ID. This is going to be the key to linking the two surveys.
  8. Click Set a Value Now
  9. Set the Login ID equal to a random number by selecting Insert Piped TextRandom Number, entering the range, then clicking Insert.
    for the login ID value, using the piped text menu to insert a random number

    Qtip: The best random number ID is 5 characters or more, decreasing the chance respondents can be randomly assigned the same ID. To learn more about generating random IDs, see Assigning Randomized IDs to Respondents.
  10. Click Apply.
  11. Go to the Actions tab.
    navigating to actions, clicking create an action, and then event-based
  12. Click Create an action.
  13. Choose Event-based.
  14. Select the Survey response.
    selecting the survey response event
  15. Choose Response Created.
    selecting response created
  16. Click Finish
  17. Click the plus sign (+) and then Task.
    clicking the plus sign and them task
  18. Choose XM Directory.
    choosing the xm directory task
  19. Select Add to XM Directory.
    choosing the add to xm directory option
  20. From the contact list dropdown, select the library with your name or your collaborating group’s name on it.
    selecting a library and choosing new contact list
  21. Select New Contact List at the top.
  22. Name the contact list something you will remember later.
    giving the list a name and clicking save
  23. Click Save.
  24. Next to External Data Reference, click the Piped Text button ( {a} ) and select Embedded Data.
    clicking the piped text menu and selecting embedded data field
  25. Type in Login ID.
    entering the login id embedded data field
  26. Click Save.
  27. Click Add or remove Embedded Data fields.
    clicking add or remove embedded data field and then add contact embedded data field
  28. Click Add contact Embedded Data field.
  29. Name one of the fields you are looking to move from survey one to survey two. In this example, we want to save the respondent’s Office.
    adding an embedded data field, and using the piped text menu to select the corresponding survey question
  30. Under the Field Value, click the Piped Text button ( {a}), hover over Survey Question, hover over the question where the respondent provides this information, and then choose Selected Choices if the respondent selected their answer, or the verbatim question text if it was an open-ended question where they typed a response.
  31. If needed, repeat steps 28-30 for any additional fields you want to move from one survey to the other.
  32. If you need to remove a field, click the red X.
  33. When you’re done adding these fields, click Close.
  34. If your survey is not anonymized, you can use the {a} button to specify where in the survey or contact list you will retrieve the respondent’s First Name, Last Name, and Email.
    adding information for first name, last name, and email address

    Qtip: For more help on using XM Directory Task, see the linked support page.
  35. Click Save when you’re finished.

Displaying the Login ID to User

Although the setup described on this support page doesn’t require that you show the respondent what their Login ID is, you may still want them to know this information, just in case. Using Piped Text for the “Login ID” embedded data field, you can show the Login ID to the respondent in several parts of the survey, including:

  • An email task that triggers to the respondent after they complete the survey.
    Qtip: You must already know or ask a respondent to provide their email address to use this option.
  • An end of survey message.
  • A question.

For more on displaying this information to respondents, see Assigning Randomized IDs to Respondents.

Second Survey Setup

Qtip: The information from the first survey can only be brought into the second survey as open text data. This means the second survey will have one text entry question for each field being brought over.
  1. Create your second survey.
  2. Create a text entry question for each data point you want to bring over.
    adding text entry questions to the survey
  3. Go to your Survey flow.
    navigating to survey flow and clicking add a new element here
  4. Click Add a New Element Here or Add Below.
  5. Choose Authenticator.
    selecting the authenticator element
  6. Click Move on each element to drag it under the authenticator. If you have multiple blocks or branches in your survey, make sure they are in order.
    adding the authenticator based on contact, selecting the contact list, and then adding pre-fill based on loginID
  7. Set the Authentication Type to Contact
  8. Select the library where you saved the contact list in the first survey.
  9. Select the same contact list you created for the contact list trigger. In this example, it is “Authenticate for Part 2.”
  10. Choose to authenticate by External Data Reference.
  11. Select Pre-fill.
    Qtip: If a respondent uses the correct link to access a survey, this option assures they are automatically logged into the survey without having to remember or type their Login ID in.
  12. Type “Login ID.”
  13. Add an embedded data element nested under the authenticator. Make sure it is before other elements under the authenticator.
    Qtip: You’ll also need to make sure you have an embedded data element before your authenticator to capture the Login ID field.
    an embedded data element for login id before the authenticator in the survey flow
  14. Click Add a New Field and add each of the fields you are trying to move over. For example,  we said we wanted to carry over everyone’s “Office,” so we have an “Office” field in the screenshot.
  15. Click Apply
    adding an embedded data element to capture the carried over fields
  16. Navigate to the Survey builder.
    selecting the text entry question, and selecting default choices
  17. Select your text entry question.
  18. Click Default choices.
  19. Click the dropdown arrow.
    using the piped text menu to select our embedded data field
  20. Select Embedded Data and enter the name of your embedded data field in the box. You can also use the dropdown menu to select a field from a list of available fields.
  21. Click Insert.
  22. Click Save.
  23. Repeat Steps 17-22 as needed.
Qtip: In order to use multiple choice questions instead of text entry questions, you will need to use JavaScript. Qualtrics Support cannot advise on custom coding, however, you can always try asking our community of dedicated users instead.

Distributing the Second Survey

In order to connect the data from your first survey to your second survey, you need to do two things: build the right link using query strings, and distribute the second survey directly from the first.

Building the Survey Link

  1. In your second survey, navigate to the Distributions tab.
    navigating to distributions and clicking get a single reusable link
  2. Select Get a single reusable link.
  3. Copy the link from the anonymous survey link section.
    copying the anonymous link from the distributions tab
  4. Paste the link into a Word document, Google Doc, Notepad, or other app where you can make some quick edits. It should look like this:
  5. At the end of the link, add a question mark ( ? ).
  6. Add the following (bolded):${e://Field/Login%20ID}

Qtip: If your survey has been translated into multiple languages, it’s possible to specify which language a respondent gets when they open the survey using query strings. You can add the language field onto the end of the link, using the below text:


Instead of XX, add your language code of choice.

Connecting the Surveys

Using the link you created above, you have several options for distributing your second survey.

  • Email task: Distribute the second half of a study to the participant based on hours / days since they finished the first half. Remember, although you’re linking to the second survey, you must add the email task to the first survey!
  • XM Directory task: Distribute the second half of a study to the participant based on days / months since they finished the first half. Remember, although you’re linking to the second survey, you must add the XM Directory task to the first survey!

    Qtip: XM Directory tasks won’t let you save them if you don’t have special piped text in them. For your link to the second survey, you will need to copy your query string and put it on the end of the “Survey URL” piped text to link to the survey, like this:


    You can also copy this exact piped text and use it as a hyperlink in your XM Directory task.
    A hyperlink window with the protocol set to other and the piped text we gave you above pasted in the URL field

  • Redirect to URL at End of Survey: When your respondents finish the first survey, they will be immediately redirected to the second survey. Remember, although you’re linking to the second survey, you must add the redirect to the end of the first survey!
    Qtip: This feature is not available for free accounts.
  • Posting Your Link: Did you display the Login ID to the participant? Do you expect them to remember this ID? After the first part of the study is complete, you can paste the second survey’s link to a website, send it to an email group, or post it wherever you know the participants will see it. Respondents can then use their Login ID to “log into” the second survey.