- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
How to build Database View to report Incidents without Outages with specific conditions.
Could someone please guide me:
- How to configure the Database View with a LEFT join so I can capture incidents without outages.
- How to apply conditions on Incident fields in the same report.
Thanks in Advance
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hi @ujjwalpundi
Create a Database View for Incidents without Outages
Create Database View
Name: u_incident_without_outage_view
Label: MIM Incident Without Outage
Plural: MIM Incidents Without Outage
Add Tables to the DB View
First Table:
Table: incident
Prefix: inc
Where clause: leave blank
Left join: false
Second Table:
Table: cmdb_ci_outage
Prefix: out
Where clause: inc.number = out.task_number
Left join: true
Save the Record
After saving, verify it by clicking the “Try It” link in the related links.
This will display incidents, and if there is no outage, the outage fields (out.*) will remain empty.
Create a Report
Navigate to Reports > Create New.
Select the table with the label name you defined (e.g., MIM Incident Without Outage).
From here, you can:
Select columns from both tables (incident → inc.*, outage → out.*).
Apply filters on Incident fields,
Or any other custom conditions from both the tables as per requirement.
This way, the report will show all Incidents without outages, and you can still apply any Incident-level filters you need.
Please accept my answer and mark as helpful/correct if it resolves your query.
Regards,
Nitish Saini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @ujjwalpundi
You can do it without using a database view. Create a report on the Incident table, and in the related list, configure it like this:
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @ujjwalpundi
You can do without DB view as well.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @ujjwalpundi would you be able to share thescreenshot of outage and incident forms?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
Hi @ujjwalpundi
Create a Database View for Incidents without Outages
Create Database View
Name: u_incident_without_outage_view
Label: MIM Incident Without Outage
Plural: MIM Incidents Without Outage
Add Tables to the DB View
First Table:
Table: incident
Prefix: inc
Where clause: leave blank
Left join: false
Second Table:
Table: cmdb_ci_outage
Prefix: out
Where clause: inc.number = out.task_number
Left join: true
Save the Record
After saving, verify it by clicking the “Try It” link in the related links.
This will display incidents, and if there is no outage, the outage fields (out.*) will remain empty.
Create a Report
Navigate to Reports > Create New.
Select the table with the label name you defined (e.g., MIM Incident Without Outage).
From here, you can:
Select columns from both tables (incident → inc.*, outage → out.*).
Apply filters on Incident fields,
Or any other custom conditions from both the tables as per requirement.
This way, the report will show all Incidents without outages, and you can still apply any Incident-level filters you need.
Please accept my answer and mark as helpful/correct if it resolves your query.
Regards,
Nitish Saini