How to create a Report on a Variable from a Variable Set in ServiceNow

DiveshTyagi
Giga Guru

Hi everyone,

I have a variable named manual_address in a variable set on the sc_request table. Its values are stored in the question_answer table.

I want to create a report that shows requests where the manual_address variable is set to "Yes".

I’m attaching screenshots of the sc_request and question_answer tables for reference.

Could someone guide me on the best way to set up a report that filters based on this variable's value?

Thanks in advance!

DiveshTyagi_0-1777971159646.png

DiveshTyagi_1-1777971182919.png

 

1 ACCEPTED SOLUTION

Aditya40
Mega Guru

Hi @DiveshTyagi ,

You can create a report using the sys_report table on your table sc_request. In the Configure tab, use the Group By functionality. To apply conditions, navigate to Questions, select the required Record Producer, and then choose the relevant Variable.

For additional clarity, please refer to the links below related to report configuration.


Report on Service Catalog Variables 

Report on Question Variables 

Aditya40_2-1777973706096.png

Thanks,

Aditya

 

View solution in original post

5 REPLIES 5

Tanushree Maiti
Kilo Patron

Hi @DiveshTyagi 

 

Refer this article/post:

How to create Report on Catalog Variables?

Report on Item Variables in the Service Catalog with a Database View

https://www.youtube.com/watch?v=xZIMd0AurkQ

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:
Catalog variables are an important part of ServiceNow, which allows catalog items to store their information. This report will provide an overview of all variable values based on the Catalog Item. -----------------------------------------------------------------------------------------------------

@Tanushree Maiti 
There is a record producer on sc_request table where manual_address variable is coming from a variable set. That variable is not present in sc_req_item as that variable is coming in sc_request via formatter "com.glideapp.questionset.DefaultQuestionEditor".

Thank You.

Hi @DiveshTyagi 

 

You have two options.

 

Options1: To report on variables from a Record Producer attached to sc_request that are not mapped to sc_req_item , you must query the question_answer table. 

 

Or 

 

Option2: creating a Database View on sc_task & question_answer table

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

PradeepReddyA
Tera Guru

Hi @DiveshTyagi 

 

Refer to this documentation 

Since the values are stored in two different tables, you can create a Database View to combine them. Join both tables using a common unique identifier (such as the record sys_id) so that related data is aligned correctly. This unified view can then be used as a single data source for reporting, enabling you to apply filters and generate insights more effectively.

 

Hope that Helps!