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.

Relating Surveys taken with Originating Task

John Gilaspy
Kilo Expert

Has anyone found a way to reliably relate surveys taken by personnel, with the ticket that generated the survey? There's no way to .walk the relationship between the two.

5 REPLIES 5

Mike McCall
Giga Guru

Even though it can be a bit overwhelming, the Task Survey Details ([task_survey_detail]) table really has all relevant information consolidated in one place.

If you're using the Reports application within Service-Now, you can create a list report on this table, then expand the "Task" column to reveal all of the fields on the original task/ticket. If you return the task's number on the report, clicking on it will actually bring you to the "Task Survey" record, which then includes a link to the original ticket within the system. (Alternatively, you can include the "Number" field right from the Task Survey Details table, and that will actually return a link directly to the original ticket.)

If you're scripting to access survey responses, then you could use something like this code:



var grSurvey = new GlideRecord('task_survey_detail');
grSurvey.get('tsdts_instance', 'dcd6bebfdcda20406ed1a61a69ec19a4'); // The sys_id is of a single survey instance in my system.
gs.log(grSurvey.tsdt_number); // "Number" field right on Task Survey Details table
gs.log(grSurvey.tsdts_task.number); // dot-walking to fields on original ticket


This is great, i have recently been asked about reporting on Surveys especially to pull out assignment groups and the resolver. I believe this must be a new table in SN?


This is excellent - exactly what I was looking for previously, shame it's not there out of the box, but this makes up for it - cheers Michael McCall!


We upgraded to Eureka which broke our Surveys. The Task_survey_detail.list no longer shows Taken By and Created By and Updated By now show as GUEST. Which this worked before Eureka. Any ideas? TIA