- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 02:45 AM
I have an email script where I am using a script include "Assessment" to fetch an URL.When checked in log link2 contains the URL.But when used in template.print then the variable link2 is fetched when clicked on the image "Anirban4.jpg" instead of the URL.Can some one suggest how to store the URL in a variable and then used in template.print?
******************************EMAIL SCRIPT********************************
var link2 = new Assessment().getITAssessmentInstance(current.sys_id);
gs.log("URL="+'link2");
template.print('<a href="link2"><img src="Anirban4.jpg"/></a>');
********************************************************************************
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2018 10:58 PM
Correct your script to
var link2 = new Assessment().getITAssessmentInstance(current.sys_id);
gs.log("URL="+link2);
template.print('<a href="'+link2+'"><img src="Anirban4.jpg"/></a>');
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2018 10:11 AM
Yes. I think you should send some additional parameter and then parse it using a client script in the survey.
I have never tried it on survey, but it works on catalog items. I am not sure if you can use a client script on Survey form. Below link might give you some direction
Please mark this response as correct or helpful if it assisted you with your question.