
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2020 12:35 PM
We would like to script the creation of a table in a mail script. The reason I want to script it is I only want to add a row if there is a value for that particular variable.
The table should look something like this. (If there is no Module then that row should not show up, etc.)
Thanks,
Stacy
Priority: | current.priority |
Product: | current.product |
Module: | current.module |
Activity: | current.activity (if there was no data for this row I don't want this row to show) |
Description: | current.description |
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 02:43 PM
I ended up not setting the font at all in my email script.
Instead I used a email layout and set the font there and called it in my email template.
Worked perfect.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 08:52 AM
Yes I understand that and I have tried that accept it does not change the font in my table or the variables.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 08:59 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 09:03 AM
can you provide your complete code?
It will be faster to provide fix.
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 09:09 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 09:17 AM
You can do something like below
template.print(current.getDisplayValue('cat_item') + "\n");
template.print('<table>');
template.print("<table style='width: 90%; color: #000000; font-family: arial, helvetica, sans-serif; font-size:12px;'>");
template.print('<tr>');
template.print('<th style="width: 100px;">Question</th><th>Answer</th>');
var vs = set.getFlatQuestions();
for (var i=0; i < vs.size(); i++) {
if(vs.get(i).getLabel() != '') {
if (vs.get(i).getDisplayValue() != ''){
template.space(4);