This page will introduce features useful for making dynamic surveys in Qualtrics. What’s a dynamic survey? If a static survey is one with fixed text and fixed options, a dynamic survey allows you to use a data file to fill in text and other options tailored specifically to your individual respondents.
Peer Evaluation
Our motivating use case will be a single-question survey that allows members on a team to rank the relative contributions of their teammates toward some project or milestone. The question type we’ll use is constant sum. In the following example, each team member starts with a default of 100 points. The total must equal 100 multiplied by the number of team members, or 500. Here is how the question will appear to a respondent:
And here is how it looks in the Qualtrics editor:
Not only are the team member names hard-coded in the question, but also the range requirement (0-500), and validation on the total sum (500).
This works for the specific team above, but what about other teams? You will need to create a static question for each one. Your data set will be separated by team and may need to be merged. Next we will look at ways to start making this question reusable and dynamic.
Piped Text and Embedded Data
Qualtrics provides a syntax you can use to replace sections of text with dynamic content. It’s called piped text and it can pull data from a variety of sources, including directory lists, embedded data, and even other questions. Embedded data are additional data fields, outside of the questions you define, that you can include in your survey questions, survey flow, and in your survey results.
Let’s take a look at piped text first. The syntax of a piped text element starts with a dollar sign and is wrapped in curly braces. It will also have a prefix indicating what the source of the piped text data will be. An e://Field/ prefix indicates that the data will come from embedded data. In the following example, each team member’s name has been replaced with a piped text token like:
${e://Field/TeamMember1}
Here’s the new dynamic question with piped text:
We also use a special syntax for math operations to calculate the total amount for validation.
$e{ 100 * ${e://Field/TeamCount} }
Here the $e at the beginning of the text instructs Qualtrics to evaluate the expression inside, in this case multiply an embedded data field named TeamCount by one hundred. The range requirement can remain static (0-500), since the upper bound will ultimately be limited by the dynamic total validation and the lower bound of zero prevents unwanted negative number inputs.
So where do we set up the embedded data? To start, you go to survey flow and add an embedded data element.
Here we defined seven fields and set a value to only one of them. The others will be set later from our data file.
Panel or Directory List
The embedded data fields above without set values say that one will be set from a Panel or URL. We will use a Panel (aka Directory list) as the data file that will contain the specific values for our teams. Here’s how the data might look first in Excel:
In this simple example, each row represents a team member who will receive the survey. There are three teams. Two teams have five members and one team has only four. One person is a member of two different teams.
To use this data, go to Qualtrics Directories. Click Create a List and select a file formatted like the example above to upload. When the import is complete your list will look like this:
See that the Team and TeamMember data are now loaded into Qualtrics for each survey recipient. Now go back to your survey project and click on Distributions. This is where we will tell Qualtrics to associate this data with your survey. Often you would select Email as the distribution method but here we’ll use Personal links instead since they’re easier to test. Go to Personal Links, click Generate Links, then select the list you created. A file will automatically download with a unique link for every team member. Here’s a small sample of mine:
Now you can test a link or two. I’ll try the link for one member of Team 3.
Pretty good so far. I see the correct four team members and the total value is set to 400.
Display Logic and Branches
We haven’t yet looked into how we can adapt to different team sizes. As this example is constructed, any team size up to five can be displayed. (If more than five are required, we just need to add the additional question options and embedded data fields.)
To vary the number of options, we will use display logic and embedded data. Back in the question options select edit display logic. For each team member, only display it if its embedded data field is not empty. See for example:
For the total count validation, we already looked at the math operation in the section on embedded data. It relies on an embedded data value named TeamCount. If you wanted, you could just include this number in your directory contact list as another field. But here I created a way to calculate it in survey flow. What we do is initialize the value to zero then use branching to determine how many team member names are not empty and add one to the count for each. Like this:
Notice that we can set TeamCount over and over again, each time replacing the old value with the new updated count.
Results
Here’s a sample of the default Qualtrics data export for this dynamic survey:
The numeric values are stored under each question ID (Q1_1, Q1_2,…). And the corresponding team member’s name appears in a separate column under the embedded data label (TeamMember1, TeamMember2,…). In the next article, we will look at techniques to reshape and analyze this data.
Resources
Example survey QSF file.
Example teams CSV file.