- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 04:28 AM
Hello Team,
I'm trying to trigger a notification when any user's try's to load a data using transform map and he gets few error/skipped/ignored.
I have created notification and trying to trigger using event but how to use event on transform map table.
Can anyone help me with the steps if possible.
Thanks,
Chaitanya
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 08:33 AM
Hi Chaitanya,
in that case you need to query the staging table with the import set number and print the information
Sample below: just enhance it
(function runMailScript(current, template, email, email_action, event) {
template.print("<table width=70% border=1><tr bgcolor=#e2e0de><td>Row</td><td>State</td><td>Error</td><td>Comment</td></tr>");
var gr = new GlideRecord('staging table');
gr.addQuery('set', current.set);
gr.query();
while(gr.next()){
template.print("<tr><td>gr.sys_import_row</td><td>gr.sys_import_state</td><td>gr.sys_row_error</td><td>gr.sys_import_state_comment</td></tr>")
}
template.print('</table>');
})(current, template, email, email_action, event);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 04:45 AM
Hi Chaitanya,
below link has the solution/approach. please go through
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 05:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 06:03 AM
Hi,
you can get to know how many records got inserted/skipped/updated etc
See below; Hope this helps you get started
Email Notification:
Email Script:
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2020 06:21 AM
I need this in table form as shown below
Can you help me I have written below script but it's not showing up
var transformhistroy_information="<table style='font-family: arial, sans-serif; border-collapse: collapse; width: 100%;'><tr><th style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>Row.</th><th style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>State</th><th style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>Error</th><th style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>Comment</th></tr>";
transformhistroy_information+="<tr><td style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>"+row+"</td><td style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>"+state.getDisplayValue()+"</td><td style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>"+error.getDisplayValue()+"</td><td style ='border: 1px solid #dddddd; text-align: left; padding: 8px;'>"+comments+"</td></tr>";