How to create database view to get all incidents whose comments are not updated since 3 days ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 11:56 PM
How to create database view to get all incidents whose comments are not updated since 3 days ?
Joining sys_journal_field table and incident table is fine but how to set the offset of X days in database view ?
Anyone has tried this approach and got the result as mentioned above ?
Note - I have a working approach of running a query BR on above mentioned tables and getting the expected result BUT want to check if a database view can satisfy the requirement without the need of a business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 12:19 AM
Hi @Snehal13
It's not possible to acheive your requirement using Database views.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 12:35 AM
I won't suggest using sys_journal_field which is a system table in database view due to performance
if your requirement is to show incidents where no comments added since 3 days then 2 approaches below:
Approach 1: create a date/time field which is custom and everytime comment is added then update it with current date/time. This field you can use in report filter conditions
Approach 2: this link has approach with metric
Report to show tickets where additional comments not updates in x number of days
Also check these links
https://community.servicenow.com/community?id=community_blog&sys_id=37c045cadbcf409023f4a345ca961921
https://community.servicenow.com/community?id=community_blog&sys_id=0740de96dbcf889023f4a345ca96195d
If my response helped please mark it correct and close the thread so that it benefits future readers
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2025 07:33 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2025 08:58 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader