Hi there --
I've built a survey which has 5 "sets" of questions, each including 3 types of questions: Multiple Choice, Side by Side, and Matrix Table. All of the questions themselves have piped text from embedded data. The Side by Side questions also have piped text from embedded data for each of the statements. The survey questions include display and skip logic, and the statements in the Side by Side questions have display logic. The first question is inline in an email distribution. There is a final question not part of a "set," which is a text entry. The purpose of the survey is to have instructors select the book(s) to be adopted for their courses.
The first question of the set is Multiple Choice and asks: For CRJ ${e://Field/Course1}: (answer options): I need to adopt books; I do not need to adopt books. The second question of the set is Side by Side and asks: For CRJ ${e://Field/Course1}, select all titles you want to adopt. The embedded data for the Side by Side statements include book data that is saved for each contact in the contact list/panel. So the statements look like ${e://Field/Book1}, ${e://Field/Book2}, ${e://Field/Book3}, etc. The columns of the Side by Side is to indicate Required, Recommended or Not Adopting; the 4th column is an open ended text box. The third question of the set is a Matrix Table and asks: For CRJ ${e://Field/Course1}, provide information for books additional to those adopted above or different from the books listed above. The statements here are just standard Book A, Book B, Book C, etc. - no piped text in the statements. This pattern of 3 questions repeats for Course2, Course3, Course4, and Course5.
I've tested the survey as a survey-taker with multiple scenarios, and it performs perfectly. The survey pulls in course/book data only pertaining to the individual survey-taker.
The issue: When I export the results, I see the embedded data coding rather than the value of the of the embedded data (i.e., ${e://Field/Book1}, rather than Seus, D. Green Eggs and Ham. or ${e://Field/Course1}, rather than CRJ 100).
My question is: Can JavaScript be used to make the values appear rather than the coding?
My concern is: I have a feeling this can't be done because Course1 or Book1 for instructor A may be different from Course1 or Book1 for instructor B. If Course1 /Book1 is referenced in the question, then the exported results can't determine which Book1 value to include. The only thing the can be determined is if the instructor indicated that his/her Book1 for his/her Course1 is Required, Recommended, or isn't to be adopted. It would then be up to me (data user) to cross reference what Book1 is for each instructor for his/her Course1. I've included an attachment to illustrate, in case I am not articulating clearly.
If this concern is correct, then I have another version of the survey that pipes the embedded data into the response options. The exported results still render the embedded data coding rather than the value, but from other posts I've read in this Community, it seems JavaScript can be used to correct this issue. (If this is the way I need to go, then I will need help with JavaScript, as I do not know how to code.) The version described above, though, creates a cleaner, more user-friendly survey, so thought I'd give it a shot.
Thank you so much for taking the time to ponder my situation!
Natalie
Page 1 / 1
Yes, you could use JavaScript to automate the cross-referencing. Pipe your embedded variables and selected answers into the JavaScript and populate new embedded variables with the cross referenced answers.
Thank you, Tom. I think I understand what you are saying. I am wondering, though, about the coding for JavaScript to pull this off. I am not a coder, so I wouldn't know where to begin.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.