We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Database view

SM6
Giga Guru

Hi,
I’m trying to build a three‑level database view based on an entity hierarchy. We have three entity types: Domain, Process, and Sub‑process. These entities are related through an entity hierarchy table with the following relationships:

Domain (upstream) → Process (downstream)
Process (upstream) → Sub‑process (downstream)

My requirement is to create a single database view that displays Domain → Process → Sub‑process together in one row.
Could you please advise on the best approach to model or create this view in ServiceNow?

 

1 ACCEPTED SOLUTION

@SM6 Then you can create 3 table views records:

 

  • sn_grc_m2m_profile_profile - M2M
  • sn_grc_profiles - PRF

And the clause should be "prf_field_name = m2m_sys_id"

 

Or I assume that it is sys ID as it is a reference field, let me know how did that go

 

 


✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---

View solution in original post

3 REPLIES 3

GlideFather
Tera Patron

Ahoy @SM6,

 

I have been doing this the last few days, my result can be seen here.

 

In a nutshell, you create a database view in sys_db_view, save it. Select a good name as it will be later the table in your instance, e.g. My Report will be https://yourinstance.service-now.com/u_my_report_list.do

 

And also, if you will then export the records to excel, this will be the name of the generated document, so choose the name wisely :))

 

Then scroll down and add the tables that you want to have there, give them prefix and then use it with the relationship through their names:

Example: Table A = Incident, Table B = Location

incident_location = location_sys_id
//sys ID from location table will be mapped to location field on incident table

GlideFather_0-1778611156008.png

 

Let me know if that help or if you need to relabel the columns or anything, I have been struggling a lot with this recently


✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---

Here the data is sitting on one table (sn_grc_m2m_profile_profile) where the upstream and downstream are the 2 fields on the table which reference to the table of records from Entities (sn_grc_profiles)

@SM6 Then you can create 3 table views records:

 

  • sn_grc_m2m_profile_profile - M2M
  • sn_grc_profiles - PRF

And the clause should be "prf_field_name = m2m_sys_id"

 

Or I assume that it is sys ID as it is a reference field, let me know how did that go

 

 


✂-----Cutting-out-the---✦AI-noise✦---All-replies-written-and-vouched-for-by-GlideFather---