How to generate multiple excel attachements based on groupBy data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 10:13 AM
Hello all,
I got a business requirement like, Creating an excel sheet and sending an email to two reference fields on that table.
As per the filter applied on that table, I need to apply group by 3 different fields, After grouping those data baed on 3 different fields, like Owned by & Supported should be same with the same publisher.
for each set of grouped data, I need to pull each and every set into individual excel sheet.
I followed this thread to generate excel sheet,
But my use case is about to generate multiple attachments on grouping data
Generate Excel file (xls or xlsx) based on script - ServiceNow Community
Can anyone share me some inputs to work on this business use case.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:09 PM
Hello @Haceena Shaik
This exactly can be done leveraging the Write functionality of GlideSysAttachment API class.
Please refer the below link and method exactly for the process -
If this doesn't aligns with you , you might have to do it individually and pull it.
Kindly mark my answer as helpful and accept solution if it helped you in anyway,
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY