- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2024 12:28 AM
is there any way to include request in report on which within 2 hours work notes are added after creation of that request for particular catalog item i want to create a report.
Thanks,
Raj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2024 10:24 AM
To get this done i created one custom field (checkbox) on RITM table (hide it on front end)
(function executeRule(current, previous /*null when async*/) {
// work notes are updated
if (!current.work_notes.nil()) {
var creationTime = new GlideDateTime(current.sys_created_on);
var currentTime = new GlideDateTime();
// calculate the difference in seconds
var diffSeconds = (currentTime.getNumericValue() - creationTime.getNumericValue()) / 1000;
// Convert seconds to hours
var diffHours = Math.round(diffSeconds / 3600);
// difference is within 2 hours and if the item is "Market Research"
if (diffSeconds <= 7200 && current.cat_item == '5a1efa5947520510f53d37d2846d439b') {
current.u_earlyresponce = true; // Set early response to true
} else {
current.u_earlyresponce = false; // Set early response to false
}
}
})(current, previous);
From this i was able to get the RITM on which work notes are added within 2 hours
Thanks,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-28-2024 08:09 AM
you can create report on sys_journal_field which stores journal entries data
Apply filter as per your requirement with created/updates date
1) element - work_notes
2) name - your table name
Please mark this answer helpful and correct if it helps you so others can benefit from this answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2024 09:23 PM
SO i wanted result for one particular catalog item that was i'm able to filer from item field on RITM table but still when i run report it is returning all the notes on RITM Table also i am not able to filter the worknote which are only added within 2 hours and it need to exclude other notes in report
Thanks,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-04-2024 10:24 AM
To get this done i created one custom field (checkbox) on RITM table (hide it on front end)
(function executeRule(current, previous /*null when async*/) {
// work notes are updated
if (!current.work_notes.nil()) {
var creationTime = new GlideDateTime(current.sys_created_on);
var currentTime = new GlideDateTime();
// calculate the difference in seconds
var diffSeconds = (currentTime.getNumericValue() - creationTime.getNumericValue()) / 1000;
// Convert seconds to hours
var diffHours = Math.round(diffSeconds / 3600);
// difference is within 2 hours and if the item is "Market Research"
if (diffSeconds <= 7200 && current.cat_item == '5a1efa5947520510f53d37d2846d439b') {
current.u_earlyresponce = true; // Set early response to true
} else {
current.u_earlyresponce = false; // Set early response to false
}
}
})(current, previous);
From this i was able to get the RITM on which work notes are added within 2 hours
Thanks,
Raj