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.

Is there any way to display Variables in a List View or Report from a Database View?

dharam743
Tera Contributor

Hello ServiceNow Community,

I’ve encountered a couple of challenges around displaying Variables for Requested Items (RITMs) in list views and reports when working with Database Views, and I wanted to see if anyone has come across a solution or workaround.

Issue 1: Show Variables in List View

When trying to display variables for a requested item in a list view, I found that this is not possible out-of-the-box (OOB). The Variable Editor, which is the specialized UI formatter responsible for displaying variable selections, is only available in the Form View. This limitation stems from the one-to-many relationship between a UI Formatter and a record, which makes it difficult to present UI Formatters (like the Variable Editor) in a list view.

I also discovered that this limitation is not customizable within a ServiceNow instance and requires a ServiceNow release update to work. However, I did see that a Database View could somewhat achieve this display of variables to a degree, though I haven’t found a clean solution yet.

Issue 2: Variable Columns in Reports (Database View)

When attempting to create a report with variables from the sc_task or sc_task_sla database view, I noticed that I was unable to display the variables in the report, even after selecting the requested variables from the dot-walked Request Item (sc_req_item) fields.

Steps I followed:

  1. Created a report on the sc_task table or database view sc_task_sla.
  2. Dot-walked to the Request Item (sc_req_item) and selected variables.
  3. Added variables to the selected list in the report.

However, when I ran the report, the selected variables did not appear in the columns. Interestingly, when I created a report directly on the sc_req_item table, the variables showed up correctly in the report.

The workaround, as I’ve found, is that in all current releases, reporting on variables through a Database View is not supported. This behavior is by design, and the only viable option seems to be reporting directly against the table that contains the variables (like sc_req_item).

Question to the Community:

Given these limitations, is there any way to work around this issue and display variables in a list view or report when using Database Views? Perhaps a script, custom formatter, or something else I might be overlooking?

Looking forward to hearing your thoughts or suggestions!

1 REPLY 1

kristinfarley
Tera Contributor

It's disappointing there are no responses to this post. It would be great if ServiceNow had a solution for issue 1.