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.

Using database view to report on variables

Jimmy Ho
Tera Contributor

Currently, if I simply report on the sc_req_item table I am able to CHOOSE COLUMN select into Variables[+], select a catalog item and then choose from one of the field variables and add it to the column of the report. 

JimmyHo_0-1692864223302.png  JimmyHo_1-1692865133612.png  JimmyHo_2-1692865202521.png

JimmyHo_3-1692865275909.png

 

 

Currently, I need to report on both the sc_req_item table and sys_approval_approver table to see the current approver for the ritm in the report. I have created a database view table for both sc_req_item and sys_approval_approver, however 'Variables[+]' option is no longer available in the 'choose column' button when reporting.

 

Following the following KB, I was able to report on the variables and values (last image of link). 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0962438#:~:text=The%20variabl...

 

Is there a way I could add a variable to the column of a report on a Database View as well? Any suggestions would be appreciated.

5 REPLIES 5

MireilleEdwards
Tera Contributor

Hello,

 

While searching on a similar topic, I came across this knowledge article.

 

Variable columns do not show on List Report when selected table is a Database View - Known Error

 

This is a known error where you can't show variables when reporting on a database view as your source.  Hope this is helpful.

 

Mireille