Changing text that is pulled from embedded data | XM Community
Question

Changing text that is pulled from embedded data

  • 28 March 2024
  • 1 reply
  • 15 views

Badge

Hi all, I'm not really sure if I'm asking this correctly or if this is even possible 

I work at a college office where we use a Qualtrics survey to gather students’ information for appointments. The survey utilizes SSO Shibboleth authenticator information. One of the data sets collected identifies a student's school of study. Using pipes texted, this information automatically fills in a Form field on the survey and is included in the survey results. However, our college uses numerical coding to identify the different schools, so the field is filled with a number instead of a school name. For example, the School of Arts is coded as :01 and this is what appears on both the participants side and within the results. Not everyone who utilizes the survey is familiar with these codes. 

Is there any way to have this information change to the student’s school name? 

Thanks in advance! 


1 reply

Userlevel 7
Badge +27

You can use JS to define the school names and fill in the form field:

Qualtrics.SurveyEngine.addOnload(function() {
var schoolList = {
":01":"School of the Arts",
":02":"School of Science" /* etc... */
};
var school = jQuery(this.questionContainer).find(".InputText").eq(0);
/*eq(0) is first input in form, change as needed*/
school.val(schoolList['${e://Field/schoolId}']);
/*update schoolId to appropriate embedded data field*/
});

 

Leave a Reply