I have this set to a form text box field “email” I am trying to embed this userid to split the
jon.doe from email john.doe@domain.com
so that userid = jon.doe
Using the below
Qualtrics.SurveyEngine.addOnUnload(function()
{
var email = "${q://QID48/ChoiceTextEntryValue/1}}";
var substrings = email.split("@", 2);
var userID = substringsI0];
// Set the user ID as embedded data
Qualtrics.SurveyEngine.setEmbeddedData("userID", userID);
It's not working. Please help, thx