From email address in format "Username@@mylaurier.ca", I need to extract "Username" and pipe it into "Reply-To Email" as ${e://Field/myUserName}.
So basically, my Java script has take "Username@@mylaurier.ca" and delete the part "@mylaurier.ca" and write "Username" into ${e://Field/myUserName}.
My JS code is:
var EmailAdr= "${q://QID13/ChoiceTextEntryValue}";
var UserNameTemp = EmailAdr.match(/^(@mylaurier.ca)@/)[1];
Qualtrics.SurveyEngine.setEmbeddedData("myUserName", UserNameTemp);
The above code is not working. ${e://Field/myUserName} returns empty string.
I suspect a problem with EmailAdr.match(/^(@mylaurier.ca)@/)[1];
The task is motivated by unwelcomed transition from deprecated triggered Email to "Tasks" , where "Reply-To Email" will be set as concatenation of ${e://Field/myUserName} and "@mylaurier.ca" as discussed https://www.qualtrics.com/community/discussion/9980/upcoming-deprecation-of-new-survey-triggers-june-30th
Question
Extracting username part from an email address
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.

When the received email is clicked on Reply-to, the expected reply email address is not there. "Reply-to" worked seamlessly in the deprecated triggered email, but is not working is Actions> Tasks as shown above.