- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2017 01:11 PM
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 03:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2017 09:13 PM
Hi Chris,
If you're using the assessment, you can do the following:
1. Create a new string question, says "Case Number"
2. go into the question in form view (via Survey > Questions)
3. Make sure you're in Assessment View
4. Change "Method" to "Default answer from script"
5. In the Script field, put this: string_result = RP.getParameterValue('casenum') + '';
6. Save and try it
Let me know how you go
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 09:04 AM
1. Here is the script that I added on the question. Note I changed the view to "Assessment View"
2. This survey is a public survey, created with the survey designer
3. Url for testing = (https://)welltokinc.service-now.com/assessment_take2.do?sysparm_assessable_type=f7b2c74c4f1e7200ccee... . (had to put https in () )
Navigating to this url I get this:
I tired this approach with a non-public survey, no luck. Have you gotten this to work yourself?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 03:33 PM
Yup here is the link to my test page and attachment is the xml of that survey
One note is that when you test it, it is best to paste the link into a fresh new private browser session
If you open the survey link as a logged in user without the casenum, it will create a survey instance for that user with blank case number and thus if you try to open it again, it will refer back to that instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 03:38 PM
Weird, I could not get this work unless I used Legacy Survey. Would love to see screen shots of your config.