How to make the fields visible on table created with database view

sath
Tera Expert

Hi,

 

We have created a database view with story(rm_story) and metric instance(metric_instance) tables and generated a report on it.

When the story state is blocked, substate and blocked reason fields will be visible on the form and those fields are populated with values on the report as well. Once the story is moved to any other state from blocked, substate and blocked reason values returns empty. I believe this is happening because the report is on database view and it will display only the fields visible on the form at the time it is retrieving data. What other options do we have to get those fields with values displayed all the time on the table/report?

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @sath 

Database views do NOT respect visibility in any forms, as they combine the ENTIRE tables with ALL it their containing columns!

 

Therefore, after adding tables, you must define which fields from each table should be visible in the database view.

This is done by adding entries to the View Fields related list under each View Table record. If you do not specify any fields in the View Fields list for a table, all fields from that table will be included by default. However, if you specify even one field in View Fields for a table, you must explicitly add all fields you want from that table; otherwise, only the specified fields will be visible. This step is crucial because if you add no fields after specifying some, the list may appear blank (no data visible).

 

Maik

View solution in original post

7 REPLIES 7

Hi @sath 

You can't do this with traditional reporting because a report can only display data that exists today. If you want to report over time, you need to use Performance Analytics. However, if it's not already running, you can only display historical data if the Story table is audited. For audited tables, you then can run a historical data collector that builds the data foundation retroactively.

Maik

Hi @Maik Skoddow  Thank you.

We need below columns to be displayed:

Story Number

Summary
State

Substate

Blocked reason

Start time

End time

Duration

Assignment group

Assigned to

I have checked audit table, you can display the old value and new value of a field that has been changed, but not the start and end time along with duration calculation.

We were able to get start and end time of a specific state along with duration calculation only from Metric Instances table, but we can not refer story fields from that table which is why we created a database view which won't work for our requirements since that's a live snapshot of data like you said.

We have Performance Analytics installed, which table should we refer to/customization needs to be done to get all these columns on a report?

Ankur Bawiskar
Tera Patron
Tera Patron

@sath 

I agree with @Maik Skoddow here.

Please follow the steps he mentioned and let us know.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader