Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Need Help with Report on Controls

Kalyan Gadde
Giga Contributor

Hi,

 

I need help with a report. My requirement is when user select a risk statement, I need to show all the Controls associated with the Risk Statement.

The relation between Risk statement to controls is as follows:

Under Risk statement , there is M2M table (sn_risk_m2m_risk_definition_policy_statement) which shows all control objectives linked to the risk statement.

Under the Control Objective there will be related list which will show all Controls.

 

So if a risk statement has 3 Control objectives and if each control objective has 2 controls associated then when user select the risk statement then I need to show all 6 controls.

Can someone help on how to achieve this?

Thanks

3 REPLIES 3

MP12
Mega Guru

Hello Kaylyan,

 

You can use database view with the parameters below.

Note the left join = true to have all the risks statements displayed even if there is no relationship with control objective.

Then you can create a report from this database view.  

MP12_1-1719993422206.png

 

 

 

Hi @MP12,
Can you explain how to connect using database view when i want to connect sn_risk_m2m_risk_definition_policy_statement, control objective and Control. Would be really helpful Thanks!

Not applicable

Hi @Kalyan Gadde ,

As @MP12  mentioned, database view is the best approach to show all the data/records from those tables into one place which can be used for your reporting.

Create a database view  and then use the where clause given by @MP12 .