- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 09:44 AM
Hello,
I have been struggling to format the following variables to a difference front and size in email script. I hope someone with provide assistance. Thank you
Here is what I have and it is completely incorrect:
var dayName = weekday[dayofWeek];
var dayName2 = '<p class=MsoNormal><span style=font-size:12.0pt;line-height:107%;font-family:"Arial",sans-serif>'"dayName2"'</span></p>';
var requiredDate = '<b>End: </b>' + dayName2 ;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:18 AM - edited 11-03-2023 10:19 AM
Hi @Lisa Goldman ,
Can u try below code
var dayName = weekday[dayofWeek]; // Assuming you have an array called weekday and dayofWeek is the index
var dayNameFormatted = '<span style="font-size: 12.0pt; line-height: 107%; font-family: Arial, sans-serif;">' + dayName + '</span>';
var requiredDate = '<b>End:</b> ' + dayNameFormatted;
Thanks,
Danish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:45 AM
@Lisa Goldman Use the following code.
var dayNameFormatted = '<span style="font-size: 12.0pt; line-height: 107%; font-family: Arial, sans-serif;"><strong>' + dayName + '</strong></span>';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:19 AM
Hi @Lisa Goldman,
Use below script in email script
var dayName = weekday[dayofWeek];
var dayName2 = '<p class="MsoNormal"><span style="font-size:12.0pt; line-height:107%; font-family:\'Arial\',sans-serif;">' + dayName + '</span></p>';
var requiredDate = '<b>End: </b>' + dayName2;
template.print(requiredDate);
In notification body use-{mail_script: your mail script name}
Please mark it as solution proposed and helpful if its serves your purpose.
Thanks,
Anand

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 10:22 AM
@Lisa Goldman Try the following.
var dayName = weekday[dayofWeek];
var dayName2 = '<p class=MsoNormal><span style=font-size:12.0pt;line-height:107%;font-family:"Arial",sans-serif>"'+dayName+'"</span></p>';
var requiredDate = '<b>End: </b>' + dayName2 ;
Hope this helps.