I have a list of names that I'd like to ask the same question for, but for each person taking the survey this list of names will be different (i.e. some people will have n = 10, others might have n = 5 or n = 20). Is there a way to add n rows to my matrix question without hardcoding the number of rows? In other words, I want the number of rows in this question to be dynamic, according to how many names are in the list.
Thanks for the help!
Solved
Add rows to matrix question using Javascript

Best answer by TomG
@JakeParelman,
Your matrix has to have the maximum number of possible rows. You can't add rows dynamically because Qualtrics won't know about them and won't record the answers on the back end.
You have two choices:
1. Include all the people and hide the ones you don't want a respondent to see with display logic or JavaScript. This may result in many data fields for the question, but will keep your data clean.
2. Include the maximum number of rows a respondent may see, and pipe the row labels from your input data. The issue with this is approach is the data fields will represent different people for different respondents so you will have to unwind the data.
View originalYour matrix has to have the maximum number of possible rows. You can't add rows dynamically because Qualtrics won't know about them and won't record the answers on the back end.
You have two choices:
1. Include all the people and hide the ones you don't want a respondent to see with display logic or JavaScript. This may result in many data fields for the question, but will keep your data clean.
2. Include the maximum number of rows a respondent may see, and pipe the row labels from your input data. The issue with this is approach is the data fields will represent different people for different respondents so you will have to unwind the data.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.