Survey Response to Ticket form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 12:15 PM
Hi All,
I'm looking for a possible way to possibly set up a reference and dot-walk to survey responses on the form of the associated ticket. For example, if I have an incident that triggers a survey, I would like those survey responses to be viewable within a tab on the incident form. I've done this with a relationship and related list but would like to display the question and answers in a tab on the form. Any help would be great. See a mock-up below:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 01:03 PM
I don't think you will be able to dot walk because the survey questions themselves aren't specific columns in the asmt_metric_results table. They are all stored as 'metrics'.
A workaround would be to create placeholders for the individual survey questions as fields on the Incident table. Through a BR you would then script to map the values from the asmt_metric_results into your new fields.
- Create the new fields on the Incident table. String type for all the survey questions, and a reference field to hold the link to the assessment instance table.
- After Update BR on assessment instance when state changes to Complete. Nested Glide Query to first find the Incident the survey related to, then loop through the specific survey questions and map them to new fields on Incident table
If you didn't want to store the values on the table, you could also just use a On-Display BR.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 01:14 PM
Hi Steve,
Thanks for the response!
I was thinking of this solution, but how would this handle all of the previous responses for reporting with the incident table? This solution only seems to be usable from a reporting aspect for new responses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 01:53 PM
You would need to run a background script in order to populate the older incident-survey-survey results relationships.
It would have to be triple nested to first find the incidents without a value in the survey reference field, then query to see if a completed survey exists related to that incident (incident sys_id = task_id.sys_id), and if one does, query the individual survey results of that survey.
This also assumes that you will never have more than a single survey relating to a single incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 02:11 PM
Yep, that makes sense. Ugh. Thanks.