Rename the exported data before we download
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2024 09:45 AM - edited ‎01-22-2024 09:54 AM
Hi All,
Happy new Year.
Can anyone please help us on the below requirements.
1. When we export the data into excel, once exporting is completed will see the "Download" button, So is there a way to change the excel file name once we hit the download button?
2. When we attach the images/screenshots to the tickets level, we want to see the "Time" also like when this file attached to the ticket?
Advance thanks.
Thanks,
AR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2024 03:02 AM
1. Changing the Excel file name after exporting in ServiceNow:
- ServiceNow does not provide an out-of-the-box feature to change the name of the exported Excel file after hitting the download button.
- The file name is generated by the system and it is not customizable.
- However, you can create a custom export feature using ServiceNow scripting and APIs to generate a file with a custom name. This would require advanced scripting knowledge and understanding of ServiceNow APIs.
2. Viewing the time when a file was attached to a ticket:
- ServiceNow does not provide a timestamp for attachments out-of-the-box.
- However, you can achieve this by creating a custom field to store the timestamp when a file is attached.
- You can use a business rule or a script include that triggers when an attachment is added. This script would capture the current time and store it in the custom field.
- Here is a sample script for a business rule:
javascript
(function executeRule(current, previous /*null when async*/) {
var attachmentGR = new GlideRecord('sys_attachment');
attachmentGR.addQuery('table_sys_id', current.sys_id);
attachmentGR.query();
if (attachmentGR.next()) {
current.u_attachment_time = attachmentGR.sys_created_on; // u_attachment_time is a custom field
current.update();
}
})(current, previous);
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - nowgpt.ai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2024 10:29 PM
Hello @sourav1999 ,
Could you please provide a solution for Changing the Excel file name after exporting in ServiceNow?
Best Regards,
Pooja
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2024 06:45 AM
I frequently rename files I export from my instance. I go to the Downloads folder and rename it there.