Public Survey "On Submit"

doernbrackc
Kilo Expert

With public surveys there is no TriggerID so you can't sink the response to the record which triggers the survey. Furthermore, since it's a public survey users don't have to log in which again means there is no way of linking the response to the case. What I can do is append the url with &casenum=XXXXX. What I have not been able to do is pull that number into a survey question automatically. There are articles online about this but they appear to be for express.

My new thought is if it's possible to pull this number out of the url using the UI page and when the user clicks submit, the number is sent over along with the response. Clearly when the user clicks the submit button it creates a record in SN for the survey response. Can we not add a field to that same table to hold this case number and send it over as part of the submit action?

I took a look at the UI page and given I'm not a programmer by trade, more of hacker, it looks to be pretty complex. Any thoughts on if this is possible?

1 ACCEPTED SOLUTION

Here are the screenshots of my config


Everything is pretty much OOB



survey designer.png


survey.pngmetric category.pngassessment metric.png


View solution in original post

18 REPLIES 18

Here are the screenshots of my config


Everything is pretty much OOB



survey designer.png


survey.pngmetric category.pngassessment metric.png


Ok so this is odd but I couldn't get to that last screen shot you show. I had to add the script via the list view.Screen Shot 2017-05-31 at 4.55.26 PM.png


Then click on the item where I noticed that Dependent Plugin was not set. Once I set it to Core it works. Wow, that was ridiculous. Thanks this is super helpful


Awesome, glad to have helped.


It's possible that you're in a different view of the form (I think it won't show if you're in Survey View but Assessment should show)view.png


Hi Nam,



I did it but what happens is the URL would first load the hrcasenum value in URL as below:


find_real_file.png



Once load is completed URL changes as below:


find_real_file.png


because of which I get value in Project field of survey as blank



find_real_file.png



Could you suggest what is being missed.


Hi Jaspal,



In your case,I believe you'll need to escape the '&' before hrcasenum to '%26', so the link will be


https://<your-instance>.service-now.com/nav_to.do?uri=assessment_take2.do%3Fsysparm_assessable_type=248d214a4f95c700eb44d48e5210c701%26hrcasenum%3D1234


Let me know how you go



Nam