Build a Risk Assessment Report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago - last edited 8 hours ago
Hi Everyone,
We need help creating a Compliance Risk Assessment report using a Database View, with an Excel export from list/table view.
Requirement
Pull Risk & Risk Assessment data ,
Risk Number, Risk, Assessment Number, Methodology, Assessable Entity
Inherent, Control Effectiveness & Residual ratings
Residual Likelihood & Impact
Risk Response, Assessor, State, Next Scheduled Date
Previous Assessment (Inherent, Control Effectiveness, Residual, Likelihood, Impact)
Control Effectiveness (5 components + sub-components)
Factors and their responses displayed as columns
Inherent Impact (Reputation, Regulatory)
Likelihood comments
Best approach to design a Database View for this?
How to flatten factor-based responses into columns?
Any limitations/best practices for Excel export?
Any guidance or examples would be appreciated. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi @ujjwala_678 ,
Hope you are doing well.
| Risk [sn_risk_risk] | risk | 100 | rk | (None) |
| Risk Assessment Instance [sn_risk_advanced_risk_assessment_instance] | asmt | 200 | as | as_risk = rk_sys_id |
| Entity [sn_grc_profile] | ent | 300 | en | rk_profile = en_sys_id |
| Risk Assessment Methodology [sn_risk_advanced_risk_assessment_methodology] | ram | 400 | rm | as_methodology = rm_sys_id |
- Ratings & Logic: These ratings (Inherent, Control Effectiveness, Residual) are stored directly on the Assessment Instance [sn_risk_advanced_risk_assessment_instance] record. sn_risk_advanced_risk_assessment_methodology_list
- Previous Assessments: To include previous ratings, you must add a second alias of the Assessment Instance table (e.g., prev_asmt) and join it where prev_asmt.risk = asmt.risk and prev_asmt.state = 'completed'.
- The Challenge: Factors are stored in a related table as multiple rows per assessment. Standard Database Views do not pivot rows into columns.
- The 2026 Solution: Use Automatic Reporting Views. When you publish a Risk Assessment Methodology (RAM) in modern versions (Xanadu/Yokohama), ServiceNow automatically generates a specific database view (typically named sn_risk_ara_<ram_sys_id>_v).
- This system-generated view already flattens factors into columns.
- Recommendation: Find this specific view in System Definition > Database Views and use it as your base instead of building one from scratch.
- Navigate to the generated Reporting View.
- Add the specific fields representing those Factor Groups to your list view.
- For sub-components, ensure the RAM is configured to "Show results at factor level" so the values roll up into the view's columns.
- List View Formatting: Before exporting, use the ServiceNow List Layout to add all required columns (Residual Likelihood, Impact, Assessor, etc.).
- Custom Labels: If Excel column headers must match specific names (e.g., "Likelihood Comments" instead of the field's technical name), use Language File [sys_documentation] entries for the Database View to override labels.
- Export Limits: By default, Excel exports are capped at 10,000 records. If your compliance report is larger, adjust the glide.pdf.max_rows or equivalent Excel system property.
- Performance: Avoid joining more than 5–6 tables in a single view, as it can cause timeouts during large Excel exports.
Regards,
Sagnic
