How to "unescape" URL link for uploaded file piped into the body of triggered Emal | XM Community
Solved

How to "unescape" URL link for uploaded file piped into the body of triggered Emal


Userlevel 3
Badge

If "${q://QID78/UploadedFileLink}" is piped into the body of triggered Email message, then it shows up in the email message as a mix of "escaped" and "unescaped" formats:
URL.PNGSo if such a link is copy-pasted into a Web browser, it will not work.
So I need to decode it and then pipe into the body of triggered Email message.
I tried to apply JavaScript 's decodeURIComponent, but no success.
Qualtrics.SurveyEngine.setEmbeddedData("newurl","${q://QID78/UploadedFileLink}");
Qualtrics.SurveyEngine.setEmbeddedData("newurldecoded", decodeURIComponent("${q://QID78/UploadedFileLink}") );

"${q://QID78/UploadedFileLink}"
"${e://Field/newurl}"
"${e://Field/newurldecoded}"

icon

Best answer by rondev 12 May 2020, 05:37

View original

3 replies

Userlevel 7
Badge +22

Put the link in the anchor tag of a text. To do this we can use link option in the email trigger, shown as below
image.png

Userlevel 3
Badge

Thanks a lot!
I spent hours and was going to do JavaScript string processing to extract and decode the necessary part of ${q://QID78/UploadedFileLink}")

Userlevel 3
Badge

Though it would be still nice to extract and pipe-in in the format
https://domain.qualtrics.com/WRQualtricsSurveyEngine/File.php?F=F_1nTN9j9QnJ5EYkt

Leave a Reply