Report creation for playbook questionnaire on existing report that is on sc_req_item table

Sakshi Singh1
Tera Contributor

I have a questionnaire as "Rejection Reason" and "Rejection reason category" on my playbook and I have created a report on sc_req_item table, and I need to call these two questionnaires "Rejection Reason" and "Rejection reason category" on my report that is on sc_req_item table. Can you help me how we can acheive this.

2 REPLIES 2

Dr Atul - LNG
Tera Patron

i  

 

https://www.servicenow.com/docs/r/now-intelligence/reporting/rep-service-catalog-variables.html

 

https://www.servicenow.com/docs/r/now-intelligence/reporting/use-service-catalog-variables-in-report...

 

****************************************************************************************
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************

Sudhanva1
Tera Expert

Hi @Sakshi Singh1 

To Capture Playbook questioner answer once this activity completes need to add new Sub flow activity to the playbook and pass the output to as sub flow input of both the questions

 

You can have 2 Service Catalog variable created which will be hidden on the form only visible on the RITM variable options will be empty until this questions are answered.

 

To update this variable from subflow we need custom action need to pass the both answer values as custom action input and add script activity. Via below script

var ritm = new GlideRecord('sc_req_item');

 

if (ritm.get(inputs.ritm_sys_id)) {

 

    ritm.variables.rejection_reason =

        inputs.rejection_reason;

 

    ritm.variables.rejection_reason_category =

        inputs.rejection_reason_category;

 

    ritm.update();

}
once the catalog item variable has the values this can be utilized in the Reporting.

 


or you have have another approach
With creating 2 fields on RITM just specific to this Catalog item and use update record action on the Subflow which adds the answer values to RITM

this can also be utilized in reporting


https://www.servicenow.com/docs/r/now-intelligence/reporting/use-service-catalog-variables-in-report...


Kindly mark this helpful this the solution approach works.

Regards
Sudhanva Chandra D
Certified ArchX || 8x ServiceNow CIS