Using a database view in a simple list in UI Builder

Ivar Donado
Mega Sage

Hi guys,

 

I'm currently working on making a custom Agent workspace for a customer.  In this workspace they want some "reports" in the landing pages that are similar to the ones they have in some dashboards, The issue I have come across is that some of those reports are built over a database view. Data visualizations in UI builder allow using database views, but simple lists don't.

 

I tried creating a data resource instance with Lookup records, but that doesn't allow using database views either it seems.

 

Is there any way?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Yeah I don't think database views are selectable as a table in that component, but there is a workaround/hack to get them to display using a client state parameter as shown in this screenshot (incident_metric is a db view table).

 

CleanShot 2022-10-06 at 08.59.15@2x.png

View solution in original post

11 REPLIES 11

Kristy Merriam
Administrator
Administrator

@Brad Tilton Any idea here?

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Yeah I don't think database views are selectable as a table in that component, but there is a workaround/hack to get them to display using a client state parameter as shown in this screenshot (incident_metric is a db view table).

 

CleanShot 2022-10-06 at 08.59.15@2x.png

Oh, that's great! I'll give it a try.

It did the trick! Thanks so much. I was just learning about UI builder and hadn't gotten to the client parameters section yet.

Later today when I start adding the events I'll check if I can access the task class so that I can tell the event which form to open.