@AMLS,
You’ll need to use JS.
First, define the embedded data fields in the survey flow: classId, courseName, location, cohortDate.
Then JS attached to a question (Assuming no underscores in course name. Underscores in course name could be handled, but it would be much more complex):
Qualtrics.SurveyEngine.addOnload(function() {
var fields = l"classId", "courseName", "location", "cohortDate"];
var vals = "${e://Field/vendorString}".split("_"); //replace vendorString with correct name
jQuery.each("fields", function(i,name) {
Qualtrics.SurveyEngine.setEmbeddedData(name, vals,i]);
)};
});
Thanks TomG. I will try and work with JS. I don’t know this language however there may be someone here who does. Right now it’s throwing an unexpected token message….all the fields are spelled correctly, so unsure what it is. I will see if someone here can help. Thanks again.
What I’m using below for reference only using my embedded info.
Qualtrics.SurveyEngine.addOnload(function() {
var fields = p"COURSEID", "COURSENAMEURL", "SITE", "COHORTDATE"];
var vals = "${e://Field/CATALOG_ID}".split("_");
jQuery.each("fields", function(i,name) {
Qualtrics.SurveyEngine.setEmbeddedData(name, valsEi]);
)};
});
Thanks TomG. I will try and work with JS. I don’t know this language however there may be someone here who does. Right now it’s throwing an unexpected token message….all the fields are spelled correctly, so unsure what it is. I will see if someone here can help. Thanks again.
What I’m using below for reference only using my embedded info.
Qualtrics.SurveyEngine.addOnload(function() {
var fields = p"COURSEID", "COURSENAMEURL", "SITE", "COHORTDATE"];
var vals = "${e://Field/CATALOG_ID}".split("_");
jQuery.each("fields", function(i,name) {
Qualtrics.SurveyEngine.setEmbeddedData(name, valsEi]);
)};
});
Oops, “fields” shouldn’t be in quotes inside the .each function.
Thanks for reviewing Tom. Same result (error message) when I remove the quotes.
Ah! We had the brackets and parathesis in the wrong order... Hoping it works now.
This code works:
Qualtrics.SurveyEngine.addOnload(function() {
var fields = ["COURSEID", "COURSENAMEURL", "SITE", "COHORTDATE"];
var vals = "${e://Field/CATALOG_ID}".split("_");
jQuery.each(fields, function(i,name) {
Qualtrics.SurveyEngine.setEmbeddedData(name, vals[i]);
});
});