- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 11:34 AM
In continuation to this question
https://community.servicenow.com/community?id=community_question&sys_id=7e3e79861be2cd50d018c8ca234bcb9c
I am getting output as "INC0000001RITM0010001"
but I am excepting output as..{table format}
Number |
INC0000001 |
RITM0010001 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 11:57 PM
Hi
As discussed in your last post , if you want to have it as a Tabular format then please update your last code which I helped you out with below code.
This will give you the details in Tabular Format
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var getArray = event.parm1.toString();
var splitStr = getArray.split(',');
template.print('<table border="1">');
for (var i = 0; i < splitStr.length; i++) {
template.print("<tr>");
template.print("<td>" + 'Number' + "</td>");
template.print("<td>" + splitStr[i] + "</td>");
template.print("</tr>");
}
template.print("</table>");
})(current, template, email, email_action, event);
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2022 11:57 PM
Hi
As discussed in your last post , if you want to have it as a Tabular format then please update your last code which I helped you out with below code.
This will give you the details in Tabular Format
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
// Add your code here
var getArray = event.parm1.toString();
var splitStr = getArray.split(',');
template.print('<table border="1">');
for (var i = 0; i < splitStr.length; i++) {
template.print("<tr>");
template.print("<td>" + 'Number' + "</td>");
template.print("<td>" + splitStr[i] + "</td>");
template.print("</tr>");
}
template.print("</table>");
})(current, template, email, email_action, event);
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke