Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

I want to populate RITM and REQUEST number to Survey questions when somebody took the survey by Survey Link in email. I have created a Survey Wizard and it is public.

Chandresh
Tera Guru

I have created a Survey Wizard and in that I have created two fields Request Number and RITM Number. I want that when somebody takes the survey bu clicking on survey link present in survey mail. Request Number and RITM should auto populate with corresponding data.

1 ACCEPTED SOLUTION

geoffcox
Giga Guru

Your survey email notification can include various parameters which can be used to populate fields on the survey form. In my example below, we are prepopulating the change request field on a survey form.



<a href="https://<mail_script>template.print(gs.getProperty('instance_name'));</mail_script>.service-now.com/survey_take.do?sysparm_survey=Environment%20Build%20Customer%20Satisfaction%20Survey&sysparm_survey_update=false&change_request=${number}">Take Survey</a></p>



Now I just have to remember where I processed that parameter...


View solution in original post

7 REPLIES 7

Hi Geoff,



Thank you for your reply.I just checked the survey link in the mail, RITM number is there in the link but it seems that script is not working in my case.With your script, I created on load wizard client script and in wizard panel i have selected survey question.



To capture number field i have created one field Item Number and i have tested this script by reference as well as by text field.Don't know where I am missing the point.



Also, while checking the syntaxt it is showing me bad escapement warning at line 4 but i guess it is warning.But it seems that script is not able to process the parm from the URL.


My syntax checker does not report a problem. You might want to double check that the script matches what's above. Better yet, paste your script in a reply so I can double check it against mine (we may have some escaping issues with this board).


It worked Geoff, Thanks a lot for your assistance.