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

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

  • May 11, 2020
  • 3 replies
  • 26 views

Forum|alt.badge.img

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}"

Best answer by rondev

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

3 replies

rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Answer
  • May 12, 2020

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


Forum|alt.badge.img
  • Author
  • Level 1 ●
  • May 12, 2020

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}")


Forum|alt.badge.img
  • Author
  • Level 1 ●
  • May 12, 2020

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