- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-03-2022 05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 03:30 AM
Hi Mahesh,
There is a work-around.
Entire report should be coded in Notification Script using GlideRecord and template.print. This way we can fulfill your requirement.
Few drawbacks also there in it.
- Maintenance would be difficult when there is a need for minor enhancement
- EMail body size will increase
Regards,
Bala T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 03:41 AM
As suggested by Bala, notification script can be used to print the table in the email.
In that case you will have to use a Scheduled script to generate the event. And the event should trigger the notification. the notification should use a notification email script to print the data in the email body. As mentioned, it may increase the email body size if the data is too much.
If it is an image, you can specify ${report:png} in the introductory message and set type as Embedded PNG in the Scheduled Report
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 03:30 AM
Hi Mahesh,
There is a work-around.
Entire report should be coded in Notification Script using GlideRecord and template.print. This way we can fulfill your requirement.
Few drawbacks also there in it.
- Maintenance would be difficult when there is a need for minor enhancement
- EMail body size will increase
Regards,
Bala T
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 04:21 AM
Thanks for the insight @Baala T .
Would you help me with the sample draft of GlideRecord to perform above action.
Thanks,
Mahesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 04:48 AM
Hi Mahesh,
Please find below skeleton of the code.
template.print('<table>');
template.print('<tr><td>Number</td><td>Short Description</td><td>State</td></tr>');
var grInc = new GlideRecord('incident');
grInc.addEncodedQuery('<FILTER CONDITION>');
grInc.query();
while(grInc.next()){
template.print('<tr><td>'+grInc.getValue('number')+'</td><td>'+grInc.getValue('short_description')+'</td><td>'+grInc.getValue('incident_state')+'</td></tr>');
}
template.print('</table>');
Regards,
Bala T

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 03:41 AM
As suggested by Bala, notification script can be used to print the table in the email.
In that case you will have to use a Scheduled script to generate the event. And the event should trigger the notification. the notification should use a notification email script to print the data in the email body. As mentioned, it may increase the email body size if the data is too much.
If it is an image, you can specify ${report:png} in the introductory message and set type as Embedded PNG in the Scheduled Report
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 04:35 AM
Thanks for the details @SanjivMeher